/** @file
 *	@brief MAVLink comm testsuite protocol generated from fppa.xml
 *	@see http://mavlink.org
 */

#pragma once

#include <gtest/gtest.h>
#include "fppa.hpp"

#ifdef TEST_INTEROP
using namespace mavlink;
#undef MAVLINK_HELPER
#include "mavlink.h"
#endif


TEST(fppa, HEARTBEAT)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::HEARTBEAT packet_in{};
    packet_in.system_status = 17;
    packet_in.mavlink_version = 84;
    packet_in.cpu_load = 17.0;
    packet_in.motor_status = 151;
    packet_in.imu_status = 218;
    packet_in.beacon_status = 29;
    packet_in.attitude_ctrl_status = 96;
    packet_in.signal_ctrl_status = 163;
    packet_in.antenna_version = {{ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 }};
    packet_in.software_version = {{ 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 }};

    mavlink::fppa::msg::HEARTBEAT packet1{};
    mavlink::fppa::msg::HEARTBEAT packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.system_status, packet2.system_status);
    EXPECT_EQ(packet1.mavlink_version, packet2.mavlink_version);
    EXPECT_EQ(packet1.cpu_load, packet2.cpu_load);
    EXPECT_EQ(packet1.motor_status, packet2.motor_status);
    EXPECT_EQ(packet1.imu_status, packet2.imu_status);
    EXPECT_EQ(packet1.beacon_status, packet2.beacon_status);
    EXPECT_EQ(packet1.attitude_ctrl_status, packet2.attitude_ctrl_status);
    EXPECT_EQ(packet1.signal_ctrl_status, packet2.signal_ctrl_status);
    EXPECT_EQ(packet1.antenna_version, packet2.antenna_version);
    EXPECT_EQ(packet1.software_version, packet2.software_version);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, HEARTBEAT)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_heartbeat_t packet_c {
         17.0, 17, 84, 151, 218, 29, 96, 163, { 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 }, { 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 }
    };

    mavlink::fppa::msg::HEARTBEAT packet_in{};
    packet_in.system_status = 17;
    packet_in.mavlink_version = 84;
    packet_in.cpu_load = 17.0;
    packet_in.motor_status = 151;
    packet_in.imu_status = 218;
    packet_in.beacon_status = 29;
    packet_in.attitude_ctrl_status = 96;
    packet_in.signal_ctrl_status = 163;
    packet_in.antenna_version = {{ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 }};
    packet_in.software_version = {{ 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 }};

    mavlink::fppa::msg::HEARTBEAT packet2{};

    mavlink_msg_heartbeat_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.system_status, packet2.system_status);
    EXPECT_EQ(packet_in.mavlink_version, packet2.mavlink_version);
    EXPECT_EQ(packet_in.cpu_load, packet2.cpu_load);
    EXPECT_EQ(packet_in.motor_status, packet2.motor_status);
    EXPECT_EQ(packet_in.imu_status, packet2.imu_status);
    EXPECT_EQ(packet_in.beacon_status, packet2.beacon_status);
    EXPECT_EQ(packet_in.attitude_ctrl_status, packet2.attitude_ctrl_status);
    EXPECT_EQ(packet_in.signal_ctrl_status, packet2.signal_ctrl_status);
    EXPECT_EQ(packet_in.antenna_version, packet2.antenna_version);
    EXPECT_EQ(packet_in.software_version, packet2.software_version);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, MOTOR_STATUS)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::MOTOR_STATUS packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.status = 125;
    packet_in.RxL1 = 73.0;
    packet_in.RxL2 = 101.0;
    packet_in.RxL3 = 129.0;
    packet_in.RxL4 = 157.0;
    packet_in.TxL1 = 185.0;
    packet_in.TxL2 = 213.0;
    packet_in.TxL3 = 241.0;
    packet_in.TxL4 = 269.0;

    mavlink::fppa::msg::MOTOR_STATUS packet1{};
    mavlink::fppa::msg::MOTOR_STATUS packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet1.status, packet2.status);
    EXPECT_EQ(packet1.RxL1, packet2.RxL1);
    EXPECT_EQ(packet1.RxL2, packet2.RxL2);
    EXPECT_EQ(packet1.RxL3, packet2.RxL3);
    EXPECT_EQ(packet1.RxL4, packet2.RxL4);
    EXPECT_EQ(packet1.TxL1, packet2.TxL1);
    EXPECT_EQ(packet1.TxL2, packet2.TxL2);
    EXPECT_EQ(packet1.TxL3, packet2.TxL3);
    EXPECT_EQ(packet1.TxL4, packet2.TxL4);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, MOTOR_STATUS)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_motor_status_t packet_c {
         93372036854775807ULL, 73.0, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 269.0, 125
    };

    mavlink::fppa::msg::MOTOR_STATUS packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.status = 125;
    packet_in.RxL1 = 73.0;
    packet_in.RxL2 = 101.0;
    packet_in.RxL3 = 129.0;
    packet_in.RxL4 = 157.0;
    packet_in.TxL1 = 185.0;
    packet_in.TxL2 = 213.0;
    packet_in.TxL3 = 241.0;
    packet_in.TxL4 = 269.0;

    mavlink::fppa::msg::MOTOR_STATUS packet2{};

    mavlink_msg_motor_status_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet_in.status, packet2.status);
    EXPECT_EQ(packet_in.RxL1, packet2.RxL1);
    EXPECT_EQ(packet_in.RxL2, packet2.RxL2);
    EXPECT_EQ(packet_in.RxL3, packet2.RxL3);
    EXPECT_EQ(packet_in.RxL4, packet2.RxL4);
    EXPECT_EQ(packet_in.TxL1, packet2.TxL1);
    EXPECT_EQ(packet_in.TxL2, packet2.TxL2);
    EXPECT_EQ(packet_in.TxL3, packet2.TxL3);
    EXPECT_EQ(packet_in.TxL4, packet2.TxL4);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, ATTITUDE_BODY)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::ATTITUDE_BODY packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.roll = 73.0;
    packet_in.pitch = 101.0;
    packet_in.yaw = 129.0;
    packet_in.roll_speed = 157.0;
    packet_in.pitch_speed = 185.0;
    packet_in.yaw_speed = 213.0;
    packet_in.roll_observed = 241.0;
    packet_in.pitch_observed = 269.0;
    packet_in.yaw_observed_mag = 297.0;
    packet_in.yaw_observed_rtk = 325.0;
    packet_in.roll_obs_sub_pred = 353.0;
    packet_in.pitch_obs_sub_pred = 381.0;
    packet_in.yaw_obs_sub_pred = 409.0;
    packet_in.gyro_x_bia = 437.0;
    packet_in.gyro_y_bia = 465.0;
    packet_in.gyro_z_bia = 493.0;
    packet_in.ba_x = 521.0;
    packet_in.ba_y = 549.0;
    packet_in.ba_z = 577.0;
    packet_in.ba_x_obs = 605.0;
    packet_in.ba_y_obs = 633.0;
    packet_in.ba_z_obs = 661.0;
    packet_in.ba_x_bia = 689.0;
    packet_in.ba_y_bia = 717.0;
    packet_in.ba_z_bia = 745.0;
    packet_in.bm_x = 773.0;
    packet_in.bm_y = 801.0;
    packet_in.bm_z = 829.0;
    packet_in.bm_x_obs = 857.0;
    packet_in.bm_y_obs = 885.0;
    packet_in.bm_z_obs = 913.0;
    packet_in.bm_x_bia = 941.0;
    packet_in.bm_y_bia = 969.0;
    packet_in.bm_z_bia = 997.0;
    packet_in.time_used = 963504952;
    packet_in.static_flag = 45;
    packet_in.reserve1 = 1053.0;
    packet_in.reserve2 = 1081.0;
    packet_in.reserve3 = 1109.0;
    packet_in.reserve4 = 1137.0;
    packet_in.reserve5 = 1165.0;
    packet_in.reserve6 = 1193.0;
    packet_in.reserve7 = 1221.0;
    packet_in.reserve8 = 1249.0;
    packet_in.reserve9 = 1277.0;

    mavlink::fppa::msg::ATTITUDE_BODY packet1{};
    mavlink::fppa::msg::ATTITUDE_BODY packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet1.roll, packet2.roll);
    EXPECT_EQ(packet1.pitch, packet2.pitch);
    EXPECT_EQ(packet1.yaw, packet2.yaw);
    EXPECT_EQ(packet1.roll_speed, packet2.roll_speed);
    EXPECT_EQ(packet1.pitch_speed, packet2.pitch_speed);
    EXPECT_EQ(packet1.yaw_speed, packet2.yaw_speed);
    EXPECT_EQ(packet1.roll_observed, packet2.roll_observed);
    EXPECT_EQ(packet1.pitch_observed, packet2.pitch_observed);
    EXPECT_EQ(packet1.yaw_observed_mag, packet2.yaw_observed_mag);
    EXPECT_EQ(packet1.yaw_observed_rtk, packet2.yaw_observed_rtk);
    EXPECT_EQ(packet1.roll_obs_sub_pred, packet2.roll_obs_sub_pred);
    EXPECT_EQ(packet1.pitch_obs_sub_pred, packet2.pitch_obs_sub_pred);
    EXPECT_EQ(packet1.yaw_obs_sub_pred, packet2.yaw_obs_sub_pred);
    EXPECT_EQ(packet1.gyro_x_bia, packet2.gyro_x_bia);
    EXPECT_EQ(packet1.gyro_y_bia, packet2.gyro_y_bia);
    EXPECT_EQ(packet1.gyro_z_bia, packet2.gyro_z_bia);
    EXPECT_EQ(packet1.ba_x, packet2.ba_x);
    EXPECT_EQ(packet1.ba_y, packet2.ba_y);
    EXPECT_EQ(packet1.ba_z, packet2.ba_z);
    EXPECT_EQ(packet1.ba_x_obs, packet2.ba_x_obs);
    EXPECT_EQ(packet1.ba_y_obs, packet2.ba_y_obs);
    EXPECT_EQ(packet1.ba_z_obs, packet2.ba_z_obs);
    EXPECT_EQ(packet1.ba_x_bia, packet2.ba_x_bia);
    EXPECT_EQ(packet1.ba_y_bia, packet2.ba_y_bia);
    EXPECT_EQ(packet1.ba_z_bia, packet2.ba_z_bia);
    EXPECT_EQ(packet1.bm_x, packet2.bm_x);
    EXPECT_EQ(packet1.bm_y, packet2.bm_y);
    EXPECT_EQ(packet1.bm_z, packet2.bm_z);
    EXPECT_EQ(packet1.bm_x_obs, packet2.bm_x_obs);
    EXPECT_EQ(packet1.bm_y_obs, packet2.bm_y_obs);
    EXPECT_EQ(packet1.bm_z_obs, packet2.bm_z_obs);
    EXPECT_EQ(packet1.bm_x_bia, packet2.bm_x_bia);
    EXPECT_EQ(packet1.bm_y_bia, packet2.bm_y_bia);
    EXPECT_EQ(packet1.bm_z_bia, packet2.bm_z_bia);
    EXPECT_EQ(packet1.time_used, packet2.time_used);
    EXPECT_EQ(packet1.static_flag, packet2.static_flag);
    EXPECT_EQ(packet1.reserve1, packet2.reserve1);
    EXPECT_EQ(packet1.reserve2, packet2.reserve2);
    EXPECT_EQ(packet1.reserve3, packet2.reserve3);
    EXPECT_EQ(packet1.reserve4, packet2.reserve4);
    EXPECT_EQ(packet1.reserve5, packet2.reserve5);
    EXPECT_EQ(packet1.reserve6, packet2.reserve6);
    EXPECT_EQ(packet1.reserve7, packet2.reserve7);
    EXPECT_EQ(packet1.reserve8, packet2.reserve8);
    EXPECT_EQ(packet1.reserve9, packet2.reserve9);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, ATTITUDE_BODY)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_attitude_body_t packet_c {
         93372036854775807ULL, 73.0, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 269.0, 297.0, 325.0, 353.0, 381.0, 409.0, 437.0, 465.0, 493.0, 521.0, 549.0, 577.0, 605.0, 633.0, 661.0, 689.0, 717.0, 745.0, 773.0, 801.0, 829.0, 857.0, 885.0, 913.0, 941.0, 969.0, 997.0, 963504952, 1053.0, 1081.0, 1109.0, 1137.0, 1165.0, 1193.0, 1221.0, 1249.0, 1277.0, 45
    };

    mavlink::fppa::msg::ATTITUDE_BODY packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.roll = 73.0;
    packet_in.pitch = 101.0;
    packet_in.yaw = 129.0;
    packet_in.roll_speed = 157.0;
    packet_in.pitch_speed = 185.0;
    packet_in.yaw_speed = 213.0;
    packet_in.roll_observed = 241.0;
    packet_in.pitch_observed = 269.0;
    packet_in.yaw_observed_mag = 297.0;
    packet_in.yaw_observed_rtk = 325.0;
    packet_in.roll_obs_sub_pred = 353.0;
    packet_in.pitch_obs_sub_pred = 381.0;
    packet_in.yaw_obs_sub_pred = 409.0;
    packet_in.gyro_x_bia = 437.0;
    packet_in.gyro_y_bia = 465.0;
    packet_in.gyro_z_bia = 493.0;
    packet_in.ba_x = 521.0;
    packet_in.ba_y = 549.0;
    packet_in.ba_z = 577.0;
    packet_in.ba_x_obs = 605.0;
    packet_in.ba_y_obs = 633.0;
    packet_in.ba_z_obs = 661.0;
    packet_in.ba_x_bia = 689.0;
    packet_in.ba_y_bia = 717.0;
    packet_in.ba_z_bia = 745.0;
    packet_in.bm_x = 773.0;
    packet_in.bm_y = 801.0;
    packet_in.bm_z = 829.0;
    packet_in.bm_x_obs = 857.0;
    packet_in.bm_y_obs = 885.0;
    packet_in.bm_z_obs = 913.0;
    packet_in.bm_x_bia = 941.0;
    packet_in.bm_y_bia = 969.0;
    packet_in.bm_z_bia = 997.0;
    packet_in.time_used = 963504952;
    packet_in.static_flag = 45;
    packet_in.reserve1 = 1053.0;
    packet_in.reserve2 = 1081.0;
    packet_in.reserve3 = 1109.0;
    packet_in.reserve4 = 1137.0;
    packet_in.reserve5 = 1165.0;
    packet_in.reserve6 = 1193.0;
    packet_in.reserve7 = 1221.0;
    packet_in.reserve8 = 1249.0;
    packet_in.reserve9 = 1277.0;

    mavlink::fppa::msg::ATTITUDE_BODY packet2{};

    mavlink_msg_attitude_body_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet_in.roll, packet2.roll);
    EXPECT_EQ(packet_in.pitch, packet2.pitch);
    EXPECT_EQ(packet_in.yaw, packet2.yaw);
    EXPECT_EQ(packet_in.roll_speed, packet2.roll_speed);
    EXPECT_EQ(packet_in.pitch_speed, packet2.pitch_speed);
    EXPECT_EQ(packet_in.yaw_speed, packet2.yaw_speed);
    EXPECT_EQ(packet_in.roll_observed, packet2.roll_observed);
    EXPECT_EQ(packet_in.pitch_observed, packet2.pitch_observed);
    EXPECT_EQ(packet_in.yaw_observed_mag, packet2.yaw_observed_mag);
    EXPECT_EQ(packet_in.yaw_observed_rtk, packet2.yaw_observed_rtk);
    EXPECT_EQ(packet_in.roll_obs_sub_pred, packet2.roll_obs_sub_pred);
    EXPECT_EQ(packet_in.pitch_obs_sub_pred, packet2.pitch_obs_sub_pred);
    EXPECT_EQ(packet_in.yaw_obs_sub_pred, packet2.yaw_obs_sub_pred);
    EXPECT_EQ(packet_in.gyro_x_bia, packet2.gyro_x_bia);
    EXPECT_EQ(packet_in.gyro_y_bia, packet2.gyro_y_bia);
    EXPECT_EQ(packet_in.gyro_z_bia, packet2.gyro_z_bia);
    EXPECT_EQ(packet_in.ba_x, packet2.ba_x);
    EXPECT_EQ(packet_in.ba_y, packet2.ba_y);
    EXPECT_EQ(packet_in.ba_z, packet2.ba_z);
    EXPECT_EQ(packet_in.ba_x_obs, packet2.ba_x_obs);
    EXPECT_EQ(packet_in.ba_y_obs, packet2.ba_y_obs);
    EXPECT_EQ(packet_in.ba_z_obs, packet2.ba_z_obs);
    EXPECT_EQ(packet_in.ba_x_bia, packet2.ba_x_bia);
    EXPECT_EQ(packet_in.ba_y_bia, packet2.ba_y_bia);
    EXPECT_EQ(packet_in.ba_z_bia, packet2.ba_z_bia);
    EXPECT_EQ(packet_in.bm_x, packet2.bm_x);
    EXPECT_EQ(packet_in.bm_y, packet2.bm_y);
    EXPECT_EQ(packet_in.bm_z, packet2.bm_z);
    EXPECT_EQ(packet_in.bm_x_obs, packet2.bm_x_obs);
    EXPECT_EQ(packet_in.bm_y_obs, packet2.bm_y_obs);
    EXPECT_EQ(packet_in.bm_z_obs, packet2.bm_z_obs);
    EXPECT_EQ(packet_in.bm_x_bia, packet2.bm_x_bia);
    EXPECT_EQ(packet_in.bm_y_bia, packet2.bm_y_bia);
    EXPECT_EQ(packet_in.bm_z_bia, packet2.bm_z_bia);
    EXPECT_EQ(packet_in.time_used, packet2.time_used);
    EXPECT_EQ(packet_in.static_flag, packet2.static_flag);
    EXPECT_EQ(packet_in.reserve1, packet2.reserve1);
    EXPECT_EQ(packet_in.reserve2, packet2.reserve2);
    EXPECT_EQ(packet_in.reserve3, packet2.reserve3);
    EXPECT_EQ(packet_in.reserve4, packet2.reserve4);
    EXPECT_EQ(packet_in.reserve5, packet2.reserve5);
    EXPECT_EQ(packet_in.reserve6, packet2.reserve6);
    EXPECT_EQ(packet_in.reserve7, packet2.reserve7);
    EXPECT_EQ(packet_in.reserve8, packet2.reserve8);
    EXPECT_EQ(packet_in.reserve9, packet2.reserve9);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, ATTITUDE_BEAM_TARGET)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::ATTITUDE_BEAM_TARGET packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.q = {{ 73.0, 74.0, 75.0, 76.0 }};
    packet_in.roll = 185.0;
    packet_in.pitch = 213.0;
    packet_in.yaw = 241.0;

    mavlink::fppa::msg::ATTITUDE_BEAM_TARGET packet1{};
    mavlink::fppa::msg::ATTITUDE_BEAM_TARGET packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet1.q, packet2.q);
    EXPECT_EQ(packet1.roll, packet2.roll);
    EXPECT_EQ(packet1.pitch, packet2.pitch);
    EXPECT_EQ(packet1.yaw, packet2.yaw);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, ATTITUDE_BEAM_TARGET)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_attitude_beam_target_t packet_c {
         93372036854775807ULL, { 73.0, 74.0, 75.0, 76.0 }, 185.0, 213.0, 241.0
    };

    mavlink::fppa::msg::ATTITUDE_BEAM_TARGET packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.q = {{ 73.0, 74.0, 75.0, 76.0 }};
    packet_in.roll = 185.0;
    packet_in.pitch = 213.0;
    packet_in.yaw = 241.0;

    mavlink::fppa::msg::ATTITUDE_BEAM_TARGET packet2{};

    mavlink_msg_attitude_beam_target_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet_in.q, packet2.q);
    EXPECT_EQ(packet_in.roll, packet2.roll);
    EXPECT_EQ(packet_in.pitch, packet2.pitch);
    EXPECT_EQ(packet_in.yaw, packet2.yaw);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, ATTITUDE_BEAM)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::ATTITUDE_BEAM packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.rx_polar = 73.0;
    packet_in.rx_pitch = 101.0;
    packet_in.rx_yaw = 129.0;
    packet_in.rx_T = 157.0;
    packet_in.rx_ap = 185.0;
    packet_in.rx_theta = 213.0;
    packet_in.rx_phi = 241.0;
    packet_in.tx_polar = 269.0;
    packet_in.tx_pitch = 297.0;
    packet_in.tx_yaw = 325.0;
    packet_in.tx_T = 353.0;
    packet_in.tx_ap = 381.0;
    packet_in.tx_theta = 409.0;
    packet_in.tx_phi = 437.0;
    packet_in.omega_x = 465.0;
    packet_in.omega_y = 493.0;
    packet_in.omega_z = 521.0;
    packet_in.mode = 1;
    packet_in.rx_freq = 549.0;
    packet_in.tx_freq = 577.0;

    mavlink::fppa::msg::ATTITUDE_BEAM packet1{};
    mavlink::fppa::msg::ATTITUDE_BEAM packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet1.rx_polar, packet2.rx_polar);
    EXPECT_EQ(packet1.rx_pitch, packet2.rx_pitch);
    EXPECT_EQ(packet1.rx_yaw, packet2.rx_yaw);
    EXPECT_EQ(packet1.rx_T, packet2.rx_T);
    EXPECT_EQ(packet1.rx_ap, packet2.rx_ap);
    EXPECT_EQ(packet1.rx_theta, packet2.rx_theta);
    EXPECT_EQ(packet1.rx_phi, packet2.rx_phi);
    EXPECT_EQ(packet1.tx_polar, packet2.tx_polar);
    EXPECT_EQ(packet1.tx_pitch, packet2.tx_pitch);
    EXPECT_EQ(packet1.tx_yaw, packet2.tx_yaw);
    EXPECT_EQ(packet1.tx_T, packet2.tx_T);
    EXPECT_EQ(packet1.tx_ap, packet2.tx_ap);
    EXPECT_EQ(packet1.tx_theta, packet2.tx_theta);
    EXPECT_EQ(packet1.tx_phi, packet2.tx_phi);
    EXPECT_EQ(packet1.omega_x, packet2.omega_x);
    EXPECT_EQ(packet1.omega_y, packet2.omega_y);
    EXPECT_EQ(packet1.omega_z, packet2.omega_z);
    EXPECT_EQ(packet1.mode, packet2.mode);
    EXPECT_EQ(packet1.rx_freq, packet2.rx_freq);
    EXPECT_EQ(packet1.tx_freq, packet2.tx_freq);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, ATTITUDE_BEAM)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_attitude_beam_t packet_c {
         93372036854775807ULL, 73.0, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 269.0, 297.0, 325.0, 353.0, 381.0, 409.0, 437.0, 465.0, 493.0, 521.0, 549.0, 577.0, 1
    };

    mavlink::fppa::msg::ATTITUDE_BEAM packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.rx_polar = 73.0;
    packet_in.rx_pitch = 101.0;
    packet_in.rx_yaw = 129.0;
    packet_in.rx_T = 157.0;
    packet_in.rx_ap = 185.0;
    packet_in.rx_theta = 213.0;
    packet_in.rx_phi = 241.0;
    packet_in.tx_polar = 269.0;
    packet_in.tx_pitch = 297.0;
    packet_in.tx_yaw = 325.0;
    packet_in.tx_T = 353.0;
    packet_in.tx_ap = 381.0;
    packet_in.tx_theta = 409.0;
    packet_in.tx_phi = 437.0;
    packet_in.omega_x = 465.0;
    packet_in.omega_y = 493.0;
    packet_in.omega_z = 521.0;
    packet_in.mode = 1;
    packet_in.rx_freq = 549.0;
    packet_in.tx_freq = 577.0;

    mavlink::fppa::msg::ATTITUDE_BEAM packet2{};

    mavlink_msg_attitude_beam_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet_in.rx_polar, packet2.rx_polar);
    EXPECT_EQ(packet_in.rx_pitch, packet2.rx_pitch);
    EXPECT_EQ(packet_in.rx_yaw, packet2.rx_yaw);
    EXPECT_EQ(packet_in.rx_T, packet2.rx_T);
    EXPECT_EQ(packet_in.rx_ap, packet2.rx_ap);
    EXPECT_EQ(packet_in.rx_theta, packet2.rx_theta);
    EXPECT_EQ(packet_in.rx_phi, packet2.rx_phi);
    EXPECT_EQ(packet_in.tx_polar, packet2.tx_polar);
    EXPECT_EQ(packet_in.tx_pitch, packet2.tx_pitch);
    EXPECT_EQ(packet_in.tx_yaw, packet2.tx_yaw);
    EXPECT_EQ(packet_in.tx_T, packet2.tx_T);
    EXPECT_EQ(packet_in.tx_ap, packet2.tx_ap);
    EXPECT_EQ(packet_in.tx_theta, packet2.tx_theta);
    EXPECT_EQ(packet_in.tx_phi, packet2.tx_phi);
    EXPECT_EQ(packet_in.omega_x, packet2.omega_x);
    EXPECT_EQ(packet_in.omega_y, packet2.omega_y);
    EXPECT_EQ(packet_in.omega_z, packet2.omega_z);
    EXPECT_EQ(packet_in.mode, packet2.mode);
    EXPECT_EQ(packet_in.rx_freq, packet2.rx_freq);
    EXPECT_EQ(packet_in.tx_freq, packet2.tx_freq);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, RAW_IMU)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::RAW_IMU packet_in{};
    packet_in.time_usec = 93372036854775807ULL;
    packet_in.xacc = 73.0;
    packet_in.yacc = 101.0;
    packet_in.zacc = 129.0;
    packet_in.xgyro = 157.0;
    packet_in.ygyro = 185.0;
    packet_in.zgyro = 213.0;
    packet_in.xmag = 241.0;
    packet_in.ymag = 269.0;
    packet_in.zmag = 297.0;
    packet_in.x_delta_v = 325.0;
    packet_in.y_delta_v = 353.0;
    packet_in.z_delta_v = 381.0;
    packet_in.x_angle = 409.0;
    packet_in.y_angle = 437.0;
    packet_in.z_angle = 465.0;
    packet_in.temperature = 493.0;

    mavlink::fppa::msg::RAW_IMU packet1{};
    mavlink::fppa::msg::RAW_IMU packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.time_usec, packet2.time_usec);
    EXPECT_EQ(packet1.xacc, packet2.xacc);
    EXPECT_EQ(packet1.yacc, packet2.yacc);
    EXPECT_EQ(packet1.zacc, packet2.zacc);
    EXPECT_EQ(packet1.xgyro, packet2.xgyro);
    EXPECT_EQ(packet1.ygyro, packet2.ygyro);
    EXPECT_EQ(packet1.zgyro, packet2.zgyro);
    EXPECT_EQ(packet1.xmag, packet2.xmag);
    EXPECT_EQ(packet1.ymag, packet2.ymag);
    EXPECT_EQ(packet1.zmag, packet2.zmag);
    EXPECT_EQ(packet1.x_delta_v, packet2.x_delta_v);
    EXPECT_EQ(packet1.y_delta_v, packet2.y_delta_v);
    EXPECT_EQ(packet1.z_delta_v, packet2.z_delta_v);
    EXPECT_EQ(packet1.x_angle, packet2.x_angle);
    EXPECT_EQ(packet1.y_angle, packet2.y_angle);
    EXPECT_EQ(packet1.z_angle, packet2.z_angle);
    EXPECT_EQ(packet1.temperature, packet2.temperature);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, RAW_IMU)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_raw_imu_t packet_c {
         93372036854775807ULL, 73.0, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 269.0, 297.0, 325.0, 353.0, 381.0, 409.0, 437.0, 465.0, 493.0
    };

    mavlink::fppa::msg::RAW_IMU packet_in{};
    packet_in.time_usec = 93372036854775807ULL;
    packet_in.xacc = 73.0;
    packet_in.yacc = 101.0;
    packet_in.zacc = 129.0;
    packet_in.xgyro = 157.0;
    packet_in.ygyro = 185.0;
    packet_in.zgyro = 213.0;
    packet_in.xmag = 241.0;
    packet_in.ymag = 269.0;
    packet_in.zmag = 297.0;
    packet_in.x_delta_v = 325.0;
    packet_in.y_delta_v = 353.0;
    packet_in.z_delta_v = 381.0;
    packet_in.x_angle = 409.0;
    packet_in.y_angle = 437.0;
    packet_in.z_angle = 465.0;
    packet_in.temperature = 493.0;

    mavlink::fppa::msg::RAW_IMU packet2{};

    mavlink_msg_raw_imu_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.time_usec, packet2.time_usec);
    EXPECT_EQ(packet_in.xacc, packet2.xacc);
    EXPECT_EQ(packet_in.yacc, packet2.yacc);
    EXPECT_EQ(packet_in.zacc, packet2.zacc);
    EXPECT_EQ(packet_in.xgyro, packet2.xgyro);
    EXPECT_EQ(packet_in.ygyro, packet2.ygyro);
    EXPECT_EQ(packet_in.zgyro, packet2.zgyro);
    EXPECT_EQ(packet_in.xmag, packet2.xmag);
    EXPECT_EQ(packet_in.ymag, packet2.ymag);
    EXPECT_EQ(packet_in.zmag, packet2.zmag);
    EXPECT_EQ(packet_in.x_delta_v, packet2.x_delta_v);
    EXPECT_EQ(packet_in.y_delta_v, packet2.y_delta_v);
    EXPECT_EQ(packet_in.z_delta_v, packet2.z_delta_v);
    EXPECT_EQ(packet_in.x_angle, packet2.x_angle);
    EXPECT_EQ(packet_in.y_angle, packet2.y_angle);
    EXPECT_EQ(packet_in.z_angle, packet2.z_angle);
    EXPECT_EQ(packet_in.temperature, packet2.temperature);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, RTK_GPS)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::RTK_GPS packet_in{};
    packet_in.fix_type = 113;
    packet_in.longitude = 17.0;
    packet_in.latitude = 45.0;
    packet_in.azimuth = 73.0;
    packet_in.height = 101.0;
    packet_in.speed = 129.0;
    packet_in.course = 157.0;
    packet_in.pdop = 185.0;
    packet_in.hdop = 213.0;
    packet_in.vdop = 241.0;
    packet_in.satellite_nums = 180;
    packet_in.year = 247;
    packet_in.month = 58;
    packet_in.day = 125;
    packet_in.hour = 192;
    packet_in.minute = 3;
    packet_in.second = 70;

    mavlink::fppa::msg::RTK_GPS packet1{};
    mavlink::fppa::msg::RTK_GPS packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.fix_type, packet2.fix_type);
    EXPECT_EQ(packet1.longitude, packet2.longitude);
    EXPECT_EQ(packet1.latitude, packet2.latitude);
    EXPECT_EQ(packet1.azimuth, packet2.azimuth);
    EXPECT_EQ(packet1.height, packet2.height);
    EXPECT_EQ(packet1.speed, packet2.speed);
    EXPECT_EQ(packet1.course, packet2.course);
    EXPECT_EQ(packet1.pdop, packet2.pdop);
    EXPECT_EQ(packet1.hdop, packet2.hdop);
    EXPECT_EQ(packet1.vdop, packet2.vdop);
    EXPECT_EQ(packet1.satellite_nums, packet2.satellite_nums);
    EXPECT_EQ(packet1.year, packet2.year);
    EXPECT_EQ(packet1.month, packet2.month);
    EXPECT_EQ(packet1.day, packet2.day);
    EXPECT_EQ(packet1.hour, packet2.hour);
    EXPECT_EQ(packet1.minute, packet2.minute);
    EXPECT_EQ(packet1.second, packet2.second);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, RTK_GPS)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_rtk_gps_t packet_c {
         17.0, 45.0, 73.0, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 113, 180, 247, 58, 125, 192, 3, 70
    };

    mavlink::fppa::msg::RTK_GPS packet_in{};
    packet_in.fix_type = 113;
    packet_in.longitude = 17.0;
    packet_in.latitude = 45.0;
    packet_in.azimuth = 73.0;
    packet_in.height = 101.0;
    packet_in.speed = 129.0;
    packet_in.course = 157.0;
    packet_in.pdop = 185.0;
    packet_in.hdop = 213.0;
    packet_in.vdop = 241.0;
    packet_in.satellite_nums = 180;
    packet_in.year = 247;
    packet_in.month = 58;
    packet_in.day = 125;
    packet_in.hour = 192;
    packet_in.minute = 3;
    packet_in.second = 70;

    mavlink::fppa::msg::RTK_GPS packet2{};

    mavlink_msg_rtk_gps_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.fix_type, packet2.fix_type);
    EXPECT_EQ(packet_in.longitude, packet2.longitude);
    EXPECT_EQ(packet_in.latitude, packet2.latitude);
    EXPECT_EQ(packet_in.azimuth, packet2.azimuth);
    EXPECT_EQ(packet_in.height, packet2.height);
    EXPECT_EQ(packet_in.speed, packet2.speed);
    EXPECT_EQ(packet_in.course, packet2.course);
    EXPECT_EQ(packet_in.pdop, packet2.pdop);
    EXPECT_EQ(packet_in.hdop, packet2.hdop);
    EXPECT_EQ(packet_in.vdop, packet2.vdop);
    EXPECT_EQ(packet_in.satellite_nums, packet2.satellite_nums);
    EXPECT_EQ(packet_in.year, packet2.year);
    EXPECT_EQ(packet_in.month, packet2.month);
    EXPECT_EQ(packet_in.day, packet2.day);
    EXPECT_EQ(packet_in.hour, packet2.hour);
    EXPECT_EQ(packet_in.minute, packet2.minute);
    EXPECT_EQ(packet_in.second, packet2.second);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, HUMITURE)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::HUMITURE packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.tempreture = 73.0;
    packet_in.humidity = 101.0;

    mavlink::fppa::msg::HUMITURE packet1{};
    mavlink::fppa::msg::HUMITURE packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet1.tempreture, packet2.tempreture);
    EXPECT_EQ(packet1.humidity, packet2.humidity);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, HUMITURE)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_humiture_t packet_c {
         93372036854775807ULL, 73.0, 101.0
    };

    mavlink::fppa::msg::HUMITURE packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.tempreture = 73.0;
    packet_in.humidity = 101.0;

    mavlink::fppa::msg::HUMITURE packet2{};

    mavlink_msg_humiture_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet_in.tempreture, packet2.tempreture);
    EXPECT_EQ(packet_in.humidity, packet2.humidity);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, BEACON_POWER)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::BEACON_POWER packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.frequency = 73.0;
    packet_in.power = 101.0;
    packet_in.LNB_voltage = 129.0;
    packet_in.LNB_LO = 157.0;
    packet_in.isLock = 125;
    packet_in.isValid = 192;
    packet_in.work_mode = 3;
    packet_in.CNR = 185.0;
    packet_in.symbol_rate = 213.0;
    packet_in.scan_range = 241.0;
    packet_in.res1 = 269.0;
    packet_in.res2 = 70;

    mavlink::fppa::msg::BEACON_POWER packet1{};
    mavlink::fppa::msg::BEACON_POWER packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet1.frequency, packet2.frequency);
    EXPECT_EQ(packet1.power, packet2.power);
    EXPECT_EQ(packet1.LNB_voltage, packet2.LNB_voltage);
    EXPECT_EQ(packet1.LNB_LO, packet2.LNB_LO);
    EXPECT_EQ(packet1.isLock, packet2.isLock);
    EXPECT_EQ(packet1.isValid, packet2.isValid);
    EXPECT_EQ(packet1.work_mode, packet2.work_mode);
    EXPECT_EQ(packet1.CNR, packet2.CNR);
    EXPECT_EQ(packet1.symbol_rate, packet2.symbol_rate);
    EXPECT_EQ(packet1.scan_range, packet2.scan_range);
    EXPECT_EQ(packet1.res1, packet2.res1);
    EXPECT_EQ(packet1.res2, packet2.res2);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, BEACON_POWER)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_beacon_power_t packet_c {
         93372036854775807ULL, 73.0, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 269.0, 125, 192, 3, 70
    };

    mavlink::fppa::msg::BEACON_POWER packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.frequency = 73.0;
    packet_in.power = 101.0;
    packet_in.LNB_voltage = 129.0;
    packet_in.LNB_LO = 157.0;
    packet_in.isLock = 125;
    packet_in.isValid = 192;
    packet_in.work_mode = 3;
    packet_in.CNR = 185.0;
    packet_in.symbol_rate = 213.0;
    packet_in.scan_range = 241.0;
    packet_in.res1 = 269.0;
    packet_in.res2 = 70;

    mavlink::fppa::msg::BEACON_POWER packet2{};

    mavlink_msg_beacon_power_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet_in.frequency, packet2.frequency);
    EXPECT_EQ(packet_in.power, packet2.power);
    EXPECT_EQ(packet_in.LNB_voltage, packet2.LNB_voltage);
    EXPECT_EQ(packet_in.LNB_LO, packet2.LNB_LO);
    EXPECT_EQ(packet_in.isLock, packet2.isLock);
    EXPECT_EQ(packet_in.isValid, packet2.isValid);
    EXPECT_EQ(packet_in.work_mode, packet2.work_mode);
    EXPECT_EQ(packet_in.CNR, packet2.CNR);
    EXPECT_EQ(packet_in.symbol_rate, packet2.symbol_rate);
    EXPECT_EQ(packet_in.scan_range, packet2.scan_range);
    EXPECT_EQ(packet_in.res1, packet2.res1);
    EXPECT_EQ(packet_in.res2, packet2.res2);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, PRICISE_IMU)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::PRICISE_IMU packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.xgyro = 73.0;
    packet_in.ygyro = 101.0;
    packet_in.zgyro = 129.0;
    packet_in.xacc = 157.0;
    packet_in.yacc = 185.0;
    packet_in.zacc = 213.0;
    packet_in.xmagn = 241.0;
    packet_in.ymagn = 269.0;
    packet_in.zmagn = 297.0;
    packet_in.magnFlg = 1;
    packet_in.Hbar = 325.0;
    packet_in.HbarFlg = 68;
    packet_in.pitch = 353.0;
    packet_in.roll = 381.0;
    packet_in.yaw = 409.0;
    packet_in.vel_e = 437.0;
    packet_in.vel_n = 465.0;
    packet_in.vel_u = 493.0;
    packet_in.longitude = 521.0;
    packet_in.latitude = 549.0;
    packet_in.hight = 577.0;
    packet_in.mode = 135;
    packet_in.scene = 202;

    mavlink::fppa::msg::PRICISE_IMU packet1{};
    mavlink::fppa::msg::PRICISE_IMU packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet1.xgyro, packet2.xgyro);
    EXPECT_EQ(packet1.ygyro, packet2.ygyro);
    EXPECT_EQ(packet1.zgyro, packet2.zgyro);
    EXPECT_EQ(packet1.xacc, packet2.xacc);
    EXPECT_EQ(packet1.yacc, packet2.yacc);
    EXPECT_EQ(packet1.zacc, packet2.zacc);
    EXPECT_EQ(packet1.xmagn, packet2.xmagn);
    EXPECT_EQ(packet1.ymagn, packet2.ymagn);
    EXPECT_EQ(packet1.zmagn, packet2.zmagn);
    EXPECT_EQ(packet1.magnFlg, packet2.magnFlg);
    EXPECT_EQ(packet1.Hbar, packet2.Hbar);
    EXPECT_EQ(packet1.HbarFlg, packet2.HbarFlg);
    EXPECT_EQ(packet1.pitch, packet2.pitch);
    EXPECT_EQ(packet1.roll, packet2.roll);
    EXPECT_EQ(packet1.yaw, packet2.yaw);
    EXPECT_EQ(packet1.vel_e, packet2.vel_e);
    EXPECT_EQ(packet1.vel_n, packet2.vel_n);
    EXPECT_EQ(packet1.vel_u, packet2.vel_u);
    EXPECT_EQ(packet1.longitude, packet2.longitude);
    EXPECT_EQ(packet1.latitude, packet2.latitude);
    EXPECT_EQ(packet1.hight, packet2.hight);
    EXPECT_EQ(packet1.mode, packet2.mode);
    EXPECT_EQ(packet1.scene, packet2.scene);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, PRICISE_IMU)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_pricise_imu_t packet_c {
         93372036854775807ULL, 73.0, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 269.0, 297.0, 325.0, 353.0, 381.0, 409.0, 437.0, 465.0, 493.0, 521.0, 549.0, 577.0, 1, 68, 135, 202
    };

    mavlink::fppa::msg::PRICISE_IMU packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.xgyro = 73.0;
    packet_in.ygyro = 101.0;
    packet_in.zgyro = 129.0;
    packet_in.xacc = 157.0;
    packet_in.yacc = 185.0;
    packet_in.zacc = 213.0;
    packet_in.xmagn = 241.0;
    packet_in.ymagn = 269.0;
    packet_in.zmagn = 297.0;
    packet_in.magnFlg = 1;
    packet_in.Hbar = 325.0;
    packet_in.HbarFlg = 68;
    packet_in.pitch = 353.0;
    packet_in.roll = 381.0;
    packet_in.yaw = 409.0;
    packet_in.vel_e = 437.0;
    packet_in.vel_n = 465.0;
    packet_in.vel_u = 493.0;
    packet_in.longitude = 521.0;
    packet_in.latitude = 549.0;
    packet_in.hight = 577.0;
    packet_in.mode = 135;
    packet_in.scene = 202;

    mavlink::fppa::msg::PRICISE_IMU packet2{};

    mavlink_msg_pricise_imu_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet_in.xgyro, packet2.xgyro);
    EXPECT_EQ(packet_in.ygyro, packet2.ygyro);
    EXPECT_EQ(packet_in.zgyro, packet2.zgyro);
    EXPECT_EQ(packet_in.xacc, packet2.xacc);
    EXPECT_EQ(packet_in.yacc, packet2.yacc);
    EXPECT_EQ(packet_in.zacc, packet2.zacc);
    EXPECT_EQ(packet_in.xmagn, packet2.xmagn);
    EXPECT_EQ(packet_in.ymagn, packet2.ymagn);
    EXPECT_EQ(packet_in.zmagn, packet2.zmagn);
    EXPECT_EQ(packet_in.magnFlg, packet2.magnFlg);
    EXPECT_EQ(packet_in.Hbar, packet2.Hbar);
    EXPECT_EQ(packet_in.HbarFlg, packet2.HbarFlg);
    EXPECT_EQ(packet_in.pitch, packet2.pitch);
    EXPECT_EQ(packet_in.roll, packet2.roll);
    EXPECT_EQ(packet_in.yaw, packet2.yaw);
    EXPECT_EQ(packet_in.vel_e, packet2.vel_e);
    EXPECT_EQ(packet_in.vel_n, packet2.vel_n);
    EXPECT_EQ(packet_in.vel_u, packet2.vel_u);
    EXPECT_EQ(packet_in.longitude, packet2.longitude);
    EXPECT_EQ(packet_in.latitude, packet2.latitude);
    EXPECT_EQ(packet_in.hight, packet2.hight);
    EXPECT_EQ(packet_in.mode, packet2.mode);
    EXPECT_EQ(packet_in.scene, packet2.scene);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, ATTITUDE_BODY_DATA)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::ATTITUDE_BODY_DATA packet_in{};
    packet_in.state = 963497464;
    packet_in.q0 = 45.0;
    packet_in.q1 = 73.0;
    packet_in.q2 = 101.0;
    packet_in.q3 = 129.0;
    packet_in.roll = 157.0;
    packet_in.pitch = 185.0;
    packet_in.yaw = 213.0;
    packet_in.bw_x = 241.0;
    packet_in.bw_y = 269.0;
    packet_in.bw_z = 297.0;
    packet_in.nw_x = 325.0;
    packet_in.nw_y = 353.0;
    packet_in.nw_z = 381.0;
    packet_in.bw_bia_x = 409.0;
    packet_in.bw_bia_y = 437.0;
    packet_in.bw_bia_z = 465.0;
    packet_in.ba_x = 493.0;
    packet_in.ba_y = 521.0;
    packet_in.ba_z = 549.0;
    packet_in.ba_bia_x = 577.0;
    packet_in.ba_bia_y = 605.0;
    packet_in.ba_bia_z = 633.0;
    packet_in.bm_x = 661.0;
    packet_in.bm_y = 689.0;
    packet_in.bm_z = 717.0;
    packet_in.bm_bia_x = 745.0;
    packet_in.bm_bia_y = 773.0;
    packet_in.bm_bia_z = 801.0;

    mavlink::fppa::msg::ATTITUDE_BODY_DATA packet1{};
    mavlink::fppa::msg::ATTITUDE_BODY_DATA packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.state, packet2.state);
    EXPECT_EQ(packet1.q0, packet2.q0);
    EXPECT_EQ(packet1.q1, packet2.q1);
    EXPECT_EQ(packet1.q2, packet2.q2);
    EXPECT_EQ(packet1.q3, packet2.q3);
    EXPECT_EQ(packet1.roll, packet2.roll);
    EXPECT_EQ(packet1.pitch, packet2.pitch);
    EXPECT_EQ(packet1.yaw, packet2.yaw);
    EXPECT_EQ(packet1.bw_x, packet2.bw_x);
    EXPECT_EQ(packet1.bw_y, packet2.bw_y);
    EXPECT_EQ(packet1.bw_z, packet2.bw_z);
    EXPECT_EQ(packet1.nw_x, packet2.nw_x);
    EXPECT_EQ(packet1.nw_y, packet2.nw_y);
    EXPECT_EQ(packet1.nw_z, packet2.nw_z);
    EXPECT_EQ(packet1.bw_bia_x, packet2.bw_bia_x);
    EXPECT_EQ(packet1.bw_bia_y, packet2.bw_bia_y);
    EXPECT_EQ(packet1.bw_bia_z, packet2.bw_bia_z);
    EXPECT_EQ(packet1.ba_x, packet2.ba_x);
    EXPECT_EQ(packet1.ba_y, packet2.ba_y);
    EXPECT_EQ(packet1.ba_z, packet2.ba_z);
    EXPECT_EQ(packet1.ba_bia_x, packet2.ba_bia_x);
    EXPECT_EQ(packet1.ba_bia_y, packet2.ba_bia_y);
    EXPECT_EQ(packet1.ba_bia_z, packet2.ba_bia_z);
    EXPECT_EQ(packet1.bm_x, packet2.bm_x);
    EXPECT_EQ(packet1.bm_y, packet2.bm_y);
    EXPECT_EQ(packet1.bm_z, packet2.bm_z);
    EXPECT_EQ(packet1.bm_bia_x, packet2.bm_bia_x);
    EXPECT_EQ(packet1.bm_bia_y, packet2.bm_bia_y);
    EXPECT_EQ(packet1.bm_bia_z, packet2.bm_bia_z);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, ATTITUDE_BODY_DATA)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_attitude_body_data_t packet_c {
         963497464, 45.0, 73.0, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 269.0, 297.0, 325.0, 353.0, 381.0, 409.0, 437.0, 465.0, 493.0, 521.0, 549.0, 577.0, 605.0, 633.0, 661.0, 689.0, 717.0, 745.0, 773.0, 801.0
    };

    mavlink::fppa::msg::ATTITUDE_BODY_DATA packet_in{};
    packet_in.state = 963497464;
    packet_in.q0 = 45.0;
    packet_in.q1 = 73.0;
    packet_in.q2 = 101.0;
    packet_in.q3 = 129.0;
    packet_in.roll = 157.0;
    packet_in.pitch = 185.0;
    packet_in.yaw = 213.0;
    packet_in.bw_x = 241.0;
    packet_in.bw_y = 269.0;
    packet_in.bw_z = 297.0;
    packet_in.nw_x = 325.0;
    packet_in.nw_y = 353.0;
    packet_in.nw_z = 381.0;
    packet_in.bw_bia_x = 409.0;
    packet_in.bw_bia_y = 437.0;
    packet_in.bw_bia_z = 465.0;
    packet_in.ba_x = 493.0;
    packet_in.ba_y = 521.0;
    packet_in.ba_z = 549.0;
    packet_in.ba_bia_x = 577.0;
    packet_in.ba_bia_y = 605.0;
    packet_in.ba_bia_z = 633.0;
    packet_in.bm_x = 661.0;
    packet_in.bm_y = 689.0;
    packet_in.bm_z = 717.0;
    packet_in.bm_bia_x = 745.0;
    packet_in.bm_bia_y = 773.0;
    packet_in.bm_bia_z = 801.0;

    mavlink::fppa::msg::ATTITUDE_BODY_DATA packet2{};

    mavlink_msg_attitude_body_data_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.state, packet2.state);
    EXPECT_EQ(packet_in.q0, packet2.q0);
    EXPECT_EQ(packet_in.q1, packet2.q1);
    EXPECT_EQ(packet_in.q2, packet2.q2);
    EXPECT_EQ(packet_in.q3, packet2.q3);
    EXPECT_EQ(packet_in.roll, packet2.roll);
    EXPECT_EQ(packet_in.pitch, packet2.pitch);
    EXPECT_EQ(packet_in.yaw, packet2.yaw);
    EXPECT_EQ(packet_in.bw_x, packet2.bw_x);
    EXPECT_EQ(packet_in.bw_y, packet2.bw_y);
    EXPECT_EQ(packet_in.bw_z, packet2.bw_z);
    EXPECT_EQ(packet_in.nw_x, packet2.nw_x);
    EXPECT_EQ(packet_in.nw_y, packet2.nw_y);
    EXPECT_EQ(packet_in.nw_z, packet2.nw_z);
    EXPECT_EQ(packet_in.bw_bia_x, packet2.bw_bia_x);
    EXPECT_EQ(packet_in.bw_bia_y, packet2.bw_bia_y);
    EXPECT_EQ(packet_in.bw_bia_z, packet2.bw_bia_z);
    EXPECT_EQ(packet_in.ba_x, packet2.ba_x);
    EXPECT_EQ(packet_in.ba_y, packet2.ba_y);
    EXPECT_EQ(packet_in.ba_z, packet2.ba_z);
    EXPECT_EQ(packet_in.ba_bia_x, packet2.ba_bia_x);
    EXPECT_EQ(packet_in.ba_bia_y, packet2.ba_bia_y);
    EXPECT_EQ(packet_in.ba_bia_z, packet2.ba_bia_z);
    EXPECT_EQ(packet_in.bm_x, packet2.bm_x);
    EXPECT_EQ(packet_in.bm_y, packet2.bm_y);
    EXPECT_EQ(packet_in.bm_z, packet2.bm_z);
    EXPECT_EQ(packet_in.bm_bia_x, packet2.bm_bia_x);
    EXPECT_EQ(packet_in.bm_bia_y, packet2.bm_bia_y);
    EXPECT_EQ(packet_in.bm_bia_z, packet2.bm_bia_z);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, ATTITUDE_BODY_DEBUG)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::ATTITUDE_BODY_DEBUG packet_in{};
    packet_in.roll_pre = 17.0;
    packet_in.pitch_pre = 45.0;
    packet_in.yaw_pre = 73.0;
    packet_in.roll_obs = 101.0;
    packet_in.pitch_obs = 129.0;
    packet_in.yaw_obs_mag = 157.0;
    packet_in.yaw_obs_rtk = 185.0;
    packet_in.roll_obs_sub_pred = 213.0;
    packet_in.pitch_obs_sub_pred = 241.0;
    packet_in.yaw_obs_sub_pred = 269.0;
    packet_in.ba_x_pre = 297.0;
    packet_in.ba_y_pre = 325.0;
    packet_in.ba_z_pre = 353.0;
    packet_in.ba_x_obs = 381.0;
    packet_in.ba_y_obs = 409.0;
    packet_in.ba_z_obs = 437.0;
    packet_in.bm_x_pre = 465.0;
    packet_in.bm_y_pre = 493.0;
    packet_in.bm_z_pre = 521.0;
    packet_in.bm_x_obs = 549.0;
    packet_in.bm_y_obs = 577.0;
    packet_in.bm_z_obs = 605.0;
    packet_in.bw_norm = 633.0;
    packet_in.ba_norm = 661.0;
    packet_in.bm_norm = 689.0;
    packet_in.time_used = 963502664;
    packet_in.static_state = 963502872;
    packet_in.disturb_state = 963503080;

    mavlink::fppa::msg::ATTITUDE_BODY_DEBUG packet1{};
    mavlink::fppa::msg::ATTITUDE_BODY_DEBUG packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.roll_pre, packet2.roll_pre);
    EXPECT_EQ(packet1.pitch_pre, packet2.pitch_pre);
    EXPECT_EQ(packet1.yaw_pre, packet2.yaw_pre);
    EXPECT_EQ(packet1.roll_obs, packet2.roll_obs);
    EXPECT_EQ(packet1.pitch_obs, packet2.pitch_obs);
    EXPECT_EQ(packet1.yaw_obs_mag, packet2.yaw_obs_mag);
    EXPECT_EQ(packet1.yaw_obs_rtk, packet2.yaw_obs_rtk);
    EXPECT_EQ(packet1.roll_obs_sub_pred, packet2.roll_obs_sub_pred);
    EXPECT_EQ(packet1.pitch_obs_sub_pred, packet2.pitch_obs_sub_pred);
    EXPECT_EQ(packet1.yaw_obs_sub_pred, packet2.yaw_obs_sub_pred);
    EXPECT_EQ(packet1.ba_x_pre, packet2.ba_x_pre);
    EXPECT_EQ(packet1.ba_y_pre, packet2.ba_y_pre);
    EXPECT_EQ(packet1.ba_z_pre, packet2.ba_z_pre);
    EXPECT_EQ(packet1.ba_x_obs, packet2.ba_x_obs);
    EXPECT_EQ(packet1.ba_y_obs, packet2.ba_y_obs);
    EXPECT_EQ(packet1.ba_z_obs, packet2.ba_z_obs);
    EXPECT_EQ(packet1.bm_x_pre, packet2.bm_x_pre);
    EXPECT_EQ(packet1.bm_y_pre, packet2.bm_y_pre);
    EXPECT_EQ(packet1.bm_z_pre, packet2.bm_z_pre);
    EXPECT_EQ(packet1.bm_x_obs, packet2.bm_x_obs);
    EXPECT_EQ(packet1.bm_y_obs, packet2.bm_y_obs);
    EXPECT_EQ(packet1.bm_z_obs, packet2.bm_z_obs);
    EXPECT_EQ(packet1.bw_norm, packet2.bw_norm);
    EXPECT_EQ(packet1.ba_norm, packet2.ba_norm);
    EXPECT_EQ(packet1.bm_norm, packet2.bm_norm);
    EXPECT_EQ(packet1.time_used, packet2.time_used);
    EXPECT_EQ(packet1.static_state, packet2.static_state);
    EXPECT_EQ(packet1.disturb_state, packet2.disturb_state);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, ATTITUDE_BODY_DEBUG)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_attitude_body_debug_t packet_c {
         17.0, 45.0, 73.0, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 269.0, 297.0, 325.0, 353.0, 381.0, 409.0, 437.0, 465.0, 493.0, 521.0, 549.0, 577.0, 605.0, 633.0, 661.0, 689.0, 963502664, 963502872, 963503080
    };

    mavlink::fppa::msg::ATTITUDE_BODY_DEBUG packet_in{};
    packet_in.roll_pre = 17.0;
    packet_in.pitch_pre = 45.0;
    packet_in.yaw_pre = 73.0;
    packet_in.roll_obs = 101.0;
    packet_in.pitch_obs = 129.0;
    packet_in.yaw_obs_mag = 157.0;
    packet_in.yaw_obs_rtk = 185.0;
    packet_in.roll_obs_sub_pred = 213.0;
    packet_in.pitch_obs_sub_pred = 241.0;
    packet_in.yaw_obs_sub_pred = 269.0;
    packet_in.ba_x_pre = 297.0;
    packet_in.ba_y_pre = 325.0;
    packet_in.ba_z_pre = 353.0;
    packet_in.ba_x_obs = 381.0;
    packet_in.ba_y_obs = 409.0;
    packet_in.ba_z_obs = 437.0;
    packet_in.bm_x_pre = 465.0;
    packet_in.bm_y_pre = 493.0;
    packet_in.bm_z_pre = 521.0;
    packet_in.bm_x_obs = 549.0;
    packet_in.bm_y_obs = 577.0;
    packet_in.bm_z_obs = 605.0;
    packet_in.bw_norm = 633.0;
    packet_in.ba_norm = 661.0;
    packet_in.bm_norm = 689.0;
    packet_in.time_used = 963502664;
    packet_in.static_state = 963502872;
    packet_in.disturb_state = 963503080;

    mavlink::fppa::msg::ATTITUDE_BODY_DEBUG packet2{};

    mavlink_msg_attitude_body_debug_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.roll_pre, packet2.roll_pre);
    EXPECT_EQ(packet_in.pitch_pre, packet2.pitch_pre);
    EXPECT_EQ(packet_in.yaw_pre, packet2.yaw_pre);
    EXPECT_EQ(packet_in.roll_obs, packet2.roll_obs);
    EXPECT_EQ(packet_in.pitch_obs, packet2.pitch_obs);
    EXPECT_EQ(packet_in.yaw_obs_mag, packet2.yaw_obs_mag);
    EXPECT_EQ(packet_in.yaw_obs_rtk, packet2.yaw_obs_rtk);
    EXPECT_EQ(packet_in.roll_obs_sub_pred, packet2.roll_obs_sub_pred);
    EXPECT_EQ(packet_in.pitch_obs_sub_pred, packet2.pitch_obs_sub_pred);
    EXPECT_EQ(packet_in.yaw_obs_sub_pred, packet2.yaw_obs_sub_pred);
    EXPECT_EQ(packet_in.ba_x_pre, packet2.ba_x_pre);
    EXPECT_EQ(packet_in.ba_y_pre, packet2.ba_y_pre);
    EXPECT_EQ(packet_in.ba_z_pre, packet2.ba_z_pre);
    EXPECT_EQ(packet_in.ba_x_obs, packet2.ba_x_obs);
    EXPECT_EQ(packet_in.ba_y_obs, packet2.ba_y_obs);
    EXPECT_EQ(packet_in.ba_z_obs, packet2.ba_z_obs);
    EXPECT_EQ(packet_in.bm_x_pre, packet2.bm_x_pre);
    EXPECT_EQ(packet_in.bm_y_pre, packet2.bm_y_pre);
    EXPECT_EQ(packet_in.bm_z_pre, packet2.bm_z_pre);
    EXPECT_EQ(packet_in.bm_x_obs, packet2.bm_x_obs);
    EXPECT_EQ(packet_in.bm_y_obs, packet2.bm_y_obs);
    EXPECT_EQ(packet_in.bm_z_obs, packet2.bm_z_obs);
    EXPECT_EQ(packet_in.bw_norm, packet2.bw_norm);
    EXPECT_EQ(packet_in.ba_norm, packet2.ba_norm);
    EXPECT_EQ(packet_in.bm_norm, packet2.bm_norm);
    EXPECT_EQ(packet_in.time_used, packet2.time_used);
    EXPECT_EQ(packet_in.static_state, packet2.static_state);
    EXPECT_EQ(packet_in.disturb_state, packet2.disturb_state);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, KALMAN_DATA_X)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::KALMAN_DATA_X packet_in{};
    packet_in.xk1 = {{ 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0 }};
    packet_in.xk0 = {{ 381.0, 382.0, 383.0, 384.0, 385.0, 386.0, 387.0, 388.0, 389.0, 390.0, 391.0, 392.0, 393.0 }};
    packet_in.delta_xk = {{ 745.0, 746.0, 747.0, 748.0, 749.0, 750.0, 751.0, 752.0, 753.0, 754.0, 755.0, 756.0, 757.0 }};
    packet_in.Q = {{ 1109.0, 1110.0, 1111.0, 1112.0, 1113.0, 1114.0, 1115.0, 1116.0, 1117.0, 1118.0, 1119.0, 1120.0, 1121.0 }};

    mavlink::fppa::msg::KALMAN_DATA_X packet1{};
    mavlink::fppa::msg::KALMAN_DATA_X packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.xk1, packet2.xk1);
    EXPECT_EQ(packet1.xk0, packet2.xk0);
    EXPECT_EQ(packet1.delta_xk, packet2.delta_xk);
    EXPECT_EQ(packet1.Q, packet2.Q);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, KALMAN_DATA_X)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_kalman_data_x_t packet_c {
         { 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0 }, { 381.0, 382.0, 383.0, 384.0, 385.0, 386.0, 387.0, 388.0, 389.0, 390.0, 391.0, 392.0, 393.0 }, { 745.0, 746.0, 747.0, 748.0, 749.0, 750.0, 751.0, 752.0, 753.0, 754.0, 755.0, 756.0, 757.0 }, { 1109.0, 1110.0, 1111.0, 1112.0, 1113.0, 1114.0, 1115.0, 1116.0, 1117.0, 1118.0, 1119.0, 1120.0, 1121.0 }
    };

    mavlink::fppa::msg::KALMAN_DATA_X packet_in{};
    packet_in.xk1 = {{ 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0 }};
    packet_in.xk0 = {{ 381.0, 382.0, 383.0, 384.0, 385.0, 386.0, 387.0, 388.0, 389.0, 390.0, 391.0, 392.0, 393.0 }};
    packet_in.delta_xk = {{ 745.0, 746.0, 747.0, 748.0, 749.0, 750.0, 751.0, 752.0, 753.0, 754.0, 755.0, 756.0, 757.0 }};
    packet_in.Q = {{ 1109.0, 1110.0, 1111.0, 1112.0, 1113.0, 1114.0, 1115.0, 1116.0, 1117.0, 1118.0, 1119.0, 1120.0, 1121.0 }};

    mavlink::fppa::msg::KALMAN_DATA_X packet2{};

    mavlink_msg_kalman_data_x_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.xk1, packet2.xk1);
    EXPECT_EQ(packet_in.xk0, packet2.xk0);
    EXPECT_EQ(packet_in.delta_xk, packet2.delta_xk);
    EXPECT_EQ(packet_in.Q, packet2.Q);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, KALMAN_DATA_Z)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::KALMAN_DATA_Z packet_in{};
    packet_in.zk = {{ 17.0, 18.0, 19.0, 20.0, 21.0, 22.0 }};
    packet_in.hk = {{ 185.0, 186.0, 187.0, 188.0, 189.0, 190.0 }};
    packet_in.vk = {{ 353.0, 354.0, 355.0, 356.0, 357.0, 358.0 }};
    packet_in.R = {{ 521.0, 522.0, 523.0, 524.0, 525.0, 526.0 }};
    packet_in.lambda = {{ 689.0, 690.0, 691.0, 692.0, 693.0, 694.0 }};
    packet_in.P0 = {{ 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0 }};

    mavlink::fppa::msg::KALMAN_DATA_Z packet1{};
    mavlink::fppa::msg::KALMAN_DATA_Z packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.zk, packet2.zk);
    EXPECT_EQ(packet1.hk, packet2.hk);
    EXPECT_EQ(packet1.vk, packet2.vk);
    EXPECT_EQ(packet1.R, packet2.R);
    EXPECT_EQ(packet1.lambda, packet2.lambda);
    EXPECT_EQ(packet1.P0, packet2.P0);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, KALMAN_DATA_Z)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_kalman_data_z_t packet_c {
         { 17.0, 18.0, 19.0, 20.0, 21.0, 22.0 }, { 185.0, 186.0, 187.0, 188.0, 189.0, 190.0 }, { 353.0, 354.0, 355.0, 356.0, 357.0, 358.0 }, { 521.0, 522.0, 523.0, 524.0, 525.0, 526.0 }, { 689.0, 690.0, 691.0, 692.0, 693.0, 694.0 }, { 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0 }
    };

    mavlink::fppa::msg::KALMAN_DATA_Z packet_in{};
    packet_in.zk = {{ 17.0, 18.0, 19.0, 20.0, 21.0, 22.0 }};
    packet_in.hk = {{ 185.0, 186.0, 187.0, 188.0, 189.0, 190.0 }};
    packet_in.vk = {{ 353.0, 354.0, 355.0, 356.0, 357.0, 358.0 }};
    packet_in.R = {{ 521.0, 522.0, 523.0, 524.0, 525.0, 526.0 }};
    packet_in.lambda = {{ 689.0, 690.0, 691.0, 692.0, 693.0, 694.0 }};
    packet_in.P0 = {{ 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0 }};

    mavlink::fppa::msg::KALMAN_DATA_Z packet2{};

    mavlink_msg_kalman_data_z_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.zk, packet2.zk);
    EXPECT_EQ(packet_in.hk, packet2.hk);
    EXPECT_EQ(packet_in.vk, packet2.vk);
    EXPECT_EQ(packet_in.R, packet2.R);
    EXPECT_EQ(packet_in.lambda, packet2.lambda);
    EXPECT_EQ(packet_in.P0, packet2.P0);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, ATT_BODY_DATA)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::ATT_BODY_DATA packet_in{};
    packet_in.state0 = 963497464;
    packet_in.state1 = 963497672;
    packet_in.state2 = 963497880;
    packet_in.q0 = 101.0;
    packet_in.q1 = 129.0;
    packet_in.q2 = 157.0;
    packet_in.q3 = 185.0;
    packet_in.roll = 213.0;
    packet_in.pitch = 241.0;
    packet_in.yaw = 269.0;
    packet_in.w_ib_b_x = 297.0;
    packet_in.w_ib_b_y = 325.0;
    packet_in.w_ib_b_z = 353.0;
    packet_in.w_ib_b_c_x = 381.0;
    packet_in.w_ib_b_c_y = 409.0;
    packet_in.w_ib_b_c_z = 437.0;
    packet_in.w_ib_b_bia_x = 465.0;
    packet_in.w_ib_b_bia_y = 493.0;
    packet_in.w_ib_b_bia_z = 521.0;
    packet_in.f_ib_b_x = 549.0;
    packet_in.f_ib_b_y = 577.0;
    packet_in.f_ib_b_z = 605.0;
    packet_in.f_ib_b_bia_x = 633.0;
    packet_in.f_ib_b_bia_y = 661.0;
    packet_in.f_ib_b_bia_z = 689.0;
    packet_in.bm_x = 717.0;
    packet_in.bm_y = 745.0;
    packet_in.bm_z = 773.0;
    packet_in.bm_bia_x = 801.0;
    packet_in.bm_bia_y = 829.0;
    packet_in.bm_bia_z = 857.0;
    packet_in.v_eb_n_x = 885.0;
    packet_in.v_eb_n_y = 913.0;
    packet_in.v_eb_n_z = 941.0;
    packet_in.p_eb_n_x = 969.0;
    packet_in.p_eb_n_y = 997.0;
    packet_in.p_eb_n_z = 1025.0;

    mavlink::fppa::msg::ATT_BODY_DATA packet1{};
    mavlink::fppa::msg::ATT_BODY_DATA packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.state0, packet2.state0);
    EXPECT_EQ(packet1.state1, packet2.state1);
    EXPECT_EQ(packet1.state2, packet2.state2);
    EXPECT_EQ(packet1.q0, packet2.q0);
    EXPECT_EQ(packet1.q1, packet2.q1);
    EXPECT_EQ(packet1.q2, packet2.q2);
    EXPECT_EQ(packet1.q3, packet2.q3);
    EXPECT_EQ(packet1.roll, packet2.roll);
    EXPECT_EQ(packet1.pitch, packet2.pitch);
    EXPECT_EQ(packet1.yaw, packet2.yaw);
    EXPECT_EQ(packet1.w_ib_b_x, packet2.w_ib_b_x);
    EXPECT_EQ(packet1.w_ib_b_y, packet2.w_ib_b_y);
    EXPECT_EQ(packet1.w_ib_b_z, packet2.w_ib_b_z);
    EXPECT_EQ(packet1.w_ib_b_c_x, packet2.w_ib_b_c_x);
    EXPECT_EQ(packet1.w_ib_b_c_y, packet2.w_ib_b_c_y);
    EXPECT_EQ(packet1.w_ib_b_c_z, packet2.w_ib_b_c_z);
    EXPECT_EQ(packet1.w_ib_b_bia_x, packet2.w_ib_b_bia_x);
    EXPECT_EQ(packet1.w_ib_b_bia_y, packet2.w_ib_b_bia_y);
    EXPECT_EQ(packet1.w_ib_b_bia_z, packet2.w_ib_b_bia_z);
    EXPECT_EQ(packet1.f_ib_b_x, packet2.f_ib_b_x);
    EXPECT_EQ(packet1.f_ib_b_y, packet2.f_ib_b_y);
    EXPECT_EQ(packet1.f_ib_b_z, packet2.f_ib_b_z);
    EXPECT_EQ(packet1.f_ib_b_bia_x, packet2.f_ib_b_bia_x);
    EXPECT_EQ(packet1.f_ib_b_bia_y, packet2.f_ib_b_bia_y);
    EXPECT_EQ(packet1.f_ib_b_bia_z, packet2.f_ib_b_bia_z);
    EXPECT_EQ(packet1.bm_x, packet2.bm_x);
    EXPECT_EQ(packet1.bm_y, packet2.bm_y);
    EXPECT_EQ(packet1.bm_z, packet2.bm_z);
    EXPECT_EQ(packet1.bm_bia_x, packet2.bm_bia_x);
    EXPECT_EQ(packet1.bm_bia_y, packet2.bm_bia_y);
    EXPECT_EQ(packet1.bm_bia_z, packet2.bm_bia_z);
    EXPECT_EQ(packet1.v_eb_n_x, packet2.v_eb_n_x);
    EXPECT_EQ(packet1.v_eb_n_y, packet2.v_eb_n_y);
    EXPECT_EQ(packet1.v_eb_n_z, packet2.v_eb_n_z);
    EXPECT_EQ(packet1.p_eb_n_x, packet2.p_eb_n_x);
    EXPECT_EQ(packet1.p_eb_n_y, packet2.p_eb_n_y);
    EXPECT_EQ(packet1.p_eb_n_z, packet2.p_eb_n_z);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, ATT_BODY_DATA)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_att_body_data_t packet_c {
         963497464, 963497672, 963497880, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 269.0, 297.0, 325.0, 353.0, 381.0, 409.0, 437.0, 465.0, 493.0, 521.0, 549.0, 577.0, 605.0, 633.0, 661.0, 689.0, 717.0, 745.0, 773.0, 801.0, 829.0, 857.0, 885.0, 913.0, 941.0, 969.0, 997.0, 1025.0
    };

    mavlink::fppa::msg::ATT_BODY_DATA packet_in{};
    packet_in.state0 = 963497464;
    packet_in.state1 = 963497672;
    packet_in.state2 = 963497880;
    packet_in.q0 = 101.0;
    packet_in.q1 = 129.0;
    packet_in.q2 = 157.0;
    packet_in.q3 = 185.0;
    packet_in.roll = 213.0;
    packet_in.pitch = 241.0;
    packet_in.yaw = 269.0;
    packet_in.w_ib_b_x = 297.0;
    packet_in.w_ib_b_y = 325.0;
    packet_in.w_ib_b_z = 353.0;
    packet_in.w_ib_b_c_x = 381.0;
    packet_in.w_ib_b_c_y = 409.0;
    packet_in.w_ib_b_c_z = 437.0;
    packet_in.w_ib_b_bia_x = 465.0;
    packet_in.w_ib_b_bia_y = 493.0;
    packet_in.w_ib_b_bia_z = 521.0;
    packet_in.f_ib_b_x = 549.0;
    packet_in.f_ib_b_y = 577.0;
    packet_in.f_ib_b_z = 605.0;
    packet_in.f_ib_b_bia_x = 633.0;
    packet_in.f_ib_b_bia_y = 661.0;
    packet_in.f_ib_b_bia_z = 689.0;
    packet_in.bm_x = 717.0;
    packet_in.bm_y = 745.0;
    packet_in.bm_z = 773.0;
    packet_in.bm_bia_x = 801.0;
    packet_in.bm_bia_y = 829.0;
    packet_in.bm_bia_z = 857.0;
    packet_in.v_eb_n_x = 885.0;
    packet_in.v_eb_n_y = 913.0;
    packet_in.v_eb_n_z = 941.0;
    packet_in.p_eb_n_x = 969.0;
    packet_in.p_eb_n_y = 997.0;
    packet_in.p_eb_n_z = 1025.0;

    mavlink::fppa::msg::ATT_BODY_DATA packet2{};

    mavlink_msg_att_body_data_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.state0, packet2.state0);
    EXPECT_EQ(packet_in.state1, packet2.state1);
    EXPECT_EQ(packet_in.state2, packet2.state2);
    EXPECT_EQ(packet_in.q0, packet2.q0);
    EXPECT_EQ(packet_in.q1, packet2.q1);
    EXPECT_EQ(packet_in.q2, packet2.q2);
    EXPECT_EQ(packet_in.q3, packet2.q3);
    EXPECT_EQ(packet_in.roll, packet2.roll);
    EXPECT_EQ(packet_in.pitch, packet2.pitch);
    EXPECT_EQ(packet_in.yaw, packet2.yaw);
    EXPECT_EQ(packet_in.w_ib_b_x, packet2.w_ib_b_x);
    EXPECT_EQ(packet_in.w_ib_b_y, packet2.w_ib_b_y);
    EXPECT_EQ(packet_in.w_ib_b_z, packet2.w_ib_b_z);
    EXPECT_EQ(packet_in.w_ib_b_c_x, packet2.w_ib_b_c_x);
    EXPECT_EQ(packet_in.w_ib_b_c_y, packet2.w_ib_b_c_y);
    EXPECT_EQ(packet_in.w_ib_b_c_z, packet2.w_ib_b_c_z);
    EXPECT_EQ(packet_in.w_ib_b_bia_x, packet2.w_ib_b_bia_x);
    EXPECT_EQ(packet_in.w_ib_b_bia_y, packet2.w_ib_b_bia_y);
    EXPECT_EQ(packet_in.w_ib_b_bia_z, packet2.w_ib_b_bia_z);
    EXPECT_EQ(packet_in.f_ib_b_x, packet2.f_ib_b_x);
    EXPECT_EQ(packet_in.f_ib_b_y, packet2.f_ib_b_y);
    EXPECT_EQ(packet_in.f_ib_b_z, packet2.f_ib_b_z);
    EXPECT_EQ(packet_in.f_ib_b_bia_x, packet2.f_ib_b_bia_x);
    EXPECT_EQ(packet_in.f_ib_b_bia_y, packet2.f_ib_b_bia_y);
    EXPECT_EQ(packet_in.f_ib_b_bia_z, packet2.f_ib_b_bia_z);
    EXPECT_EQ(packet_in.bm_x, packet2.bm_x);
    EXPECT_EQ(packet_in.bm_y, packet2.bm_y);
    EXPECT_EQ(packet_in.bm_z, packet2.bm_z);
    EXPECT_EQ(packet_in.bm_bia_x, packet2.bm_bia_x);
    EXPECT_EQ(packet_in.bm_bia_y, packet2.bm_bia_y);
    EXPECT_EQ(packet_in.bm_bia_z, packet2.bm_bia_z);
    EXPECT_EQ(packet_in.v_eb_n_x, packet2.v_eb_n_x);
    EXPECT_EQ(packet_in.v_eb_n_y, packet2.v_eb_n_y);
    EXPECT_EQ(packet_in.v_eb_n_z, packet2.v_eb_n_z);
    EXPECT_EQ(packet_in.p_eb_n_x, packet2.p_eb_n_x);
    EXPECT_EQ(packet_in.p_eb_n_y, packet2.p_eb_n_y);
    EXPECT_EQ(packet_in.p_eb_n_z, packet2.p_eb_n_z);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, ATT_BODY_DEBUG)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::ATT_BODY_DEBUG packet_in{};
    packet_in.roll_obs = 17.0;
    packet_in.pitch_obs = 45.0;
    packet_in.yaw_obs_mag = 73.0;
    packet_in.yaw_obs_rtk = 101.0;
    packet_in.roll_obs_sub_pred = 129.0;
    packet_in.pitch_obs_sub_pred = 157.0;
    packet_in.yaw_obs_sub_pred = 185.0;
    packet_in.f_ib_n_x = 213.0;
    packet_in.f_ib_n_y = 241.0;
    packet_in.f_ib_n_z = 269.0;
    packet_in.g0_x = 297.0;
    packet_in.g0_y = 325.0;
    packet_in.g0_z = 353.0;
    packet_in.declination = 381.0;
    packet_in.inclination = 409.0;
    packet_in.nm_earth_x = 437.0;
    packet_in.nm_earth_y = 465.0;
    packet_in.nm_earth_z = 493.0;
    packet_in.nm_x = 521.0;
    packet_in.nm_y = 549.0;
    packet_in.nm_z = 577.0;
    packet_in.RN = 605.0;
    packet_in.RE = 633.0;
    packet_in.v_eb_n_obs_x = 661.0;
    packet_in.v_eb_n_obs_y = 689.0;
    packet_in.v_eb_n_obs_z = 717.0;
    packet_in.p_eb_n_obs_x = 745.0;
    packet_in.p_eb_n_obs_y = 773.0;
    packet_in.p_eb_n_obs_z = 801.0;
    packet_in.w_ib_b_norm = 829.0;
    packet_in.f_ib_b_norm = 857.0;
    packet_in.bm_norm = 885.0;
    packet_in.time_used = 963504120;
    packet_in.dt = 963504328;
    packet_in.static_state = 963504536;
    packet_in.disturb_state = 963504744;

    mavlink::fppa::msg::ATT_BODY_DEBUG packet1{};
    mavlink::fppa::msg::ATT_BODY_DEBUG packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.roll_obs, packet2.roll_obs);
    EXPECT_EQ(packet1.pitch_obs, packet2.pitch_obs);
    EXPECT_EQ(packet1.yaw_obs_mag, packet2.yaw_obs_mag);
    EXPECT_EQ(packet1.yaw_obs_rtk, packet2.yaw_obs_rtk);
    EXPECT_EQ(packet1.roll_obs_sub_pred, packet2.roll_obs_sub_pred);
    EXPECT_EQ(packet1.pitch_obs_sub_pred, packet2.pitch_obs_sub_pred);
    EXPECT_EQ(packet1.yaw_obs_sub_pred, packet2.yaw_obs_sub_pred);
    EXPECT_EQ(packet1.f_ib_n_x, packet2.f_ib_n_x);
    EXPECT_EQ(packet1.f_ib_n_y, packet2.f_ib_n_y);
    EXPECT_EQ(packet1.f_ib_n_z, packet2.f_ib_n_z);
    EXPECT_EQ(packet1.g0_x, packet2.g0_x);
    EXPECT_EQ(packet1.g0_y, packet2.g0_y);
    EXPECT_EQ(packet1.g0_z, packet2.g0_z);
    EXPECT_EQ(packet1.declination, packet2.declination);
    EXPECT_EQ(packet1.inclination, packet2.inclination);
    EXPECT_EQ(packet1.nm_earth_x, packet2.nm_earth_x);
    EXPECT_EQ(packet1.nm_earth_y, packet2.nm_earth_y);
    EXPECT_EQ(packet1.nm_earth_z, packet2.nm_earth_z);
    EXPECT_EQ(packet1.nm_x, packet2.nm_x);
    EXPECT_EQ(packet1.nm_y, packet2.nm_y);
    EXPECT_EQ(packet1.nm_z, packet2.nm_z);
    EXPECT_EQ(packet1.RN, packet2.RN);
    EXPECT_EQ(packet1.RE, packet2.RE);
    EXPECT_EQ(packet1.v_eb_n_obs_x, packet2.v_eb_n_obs_x);
    EXPECT_EQ(packet1.v_eb_n_obs_y, packet2.v_eb_n_obs_y);
    EXPECT_EQ(packet1.v_eb_n_obs_z, packet2.v_eb_n_obs_z);
    EXPECT_EQ(packet1.p_eb_n_obs_x, packet2.p_eb_n_obs_x);
    EXPECT_EQ(packet1.p_eb_n_obs_y, packet2.p_eb_n_obs_y);
    EXPECT_EQ(packet1.p_eb_n_obs_z, packet2.p_eb_n_obs_z);
    EXPECT_EQ(packet1.w_ib_b_norm, packet2.w_ib_b_norm);
    EXPECT_EQ(packet1.f_ib_b_norm, packet2.f_ib_b_norm);
    EXPECT_EQ(packet1.bm_norm, packet2.bm_norm);
    EXPECT_EQ(packet1.time_used, packet2.time_used);
    EXPECT_EQ(packet1.dt, packet2.dt);
    EXPECT_EQ(packet1.static_state, packet2.static_state);
    EXPECT_EQ(packet1.disturb_state, packet2.disturb_state);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, ATT_BODY_DEBUG)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_att_body_debug_t packet_c {
         17.0, 45.0, 73.0, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 269.0, 297.0, 325.0, 353.0, 381.0, 409.0, 437.0, 465.0, 493.0, 521.0, 549.0, 577.0, 605.0, 633.0, 661.0, 689.0, 717.0, 745.0, 773.0, 801.0, 829.0, 857.0, 885.0, 963504120, 963504328, 963504536, 963504744
    };

    mavlink::fppa::msg::ATT_BODY_DEBUG packet_in{};
    packet_in.roll_obs = 17.0;
    packet_in.pitch_obs = 45.0;
    packet_in.yaw_obs_mag = 73.0;
    packet_in.yaw_obs_rtk = 101.0;
    packet_in.roll_obs_sub_pred = 129.0;
    packet_in.pitch_obs_sub_pred = 157.0;
    packet_in.yaw_obs_sub_pred = 185.0;
    packet_in.f_ib_n_x = 213.0;
    packet_in.f_ib_n_y = 241.0;
    packet_in.f_ib_n_z = 269.0;
    packet_in.g0_x = 297.0;
    packet_in.g0_y = 325.0;
    packet_in.g0_z = 353.0;
    packet_in.declination = 381.0;
    packet_in.inclination = 409.0;
    packet_in.nm_earth_x = 437.0;
    packet_in.nm_earth_y = 465.0;
    packet_in.nm_earth_z = 493.0;
    packet_in.nm_x = 521.0;
    packet_in.nm_y = 549.0;
    packet_in.nm_z = 577.0;
    packet_in.RN = 605.0;
    packet_in.RE = 633.0;
    packet_in.v_eb_n_obs_x = 661.0;
    packet_in.v_eb_n_obs_y = 689.0;
    packet_in.v_eb_n_obs_z = 717.0;
    packet_in.p_eb_n_obs_x = 745.0;
    packet_in.p_eb_n_obs_y = 773.0;
    packet_in.p_eb_n_obs_z = 801.0;
    packet_in.w_ib_b_norm = 829.0;
    packet_in.f_ib_b_norm = 857.0;
    packet_in.bm_norm = 885.0;
    packet_in.time_used = 963504120;
    packet_in.dt = 963504328;
    packet_in.static_state = 963504536;
    packet_in.disturb_state = 963504744;

    mavlink::fppa::msg::ATT_BODY_DEBUG packet2{};

    mavlink_msg_att_body_debug_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.roll_obs, packet2.roll_obs);
    EXPECT_EQ(packet_in.pitch_obs, packet2.pitch_obs);
    EXPECT_EQ(packet_in.yaw_obs_mag, packet2.yaw_obs_mag);
    EXPECT_EQ(packet_in.yaw_obs_rtk, packet2.yaw_obs_rtk);
    EXPECT_EQ(packet_in.roll_obs_sub_pred, packet2.roll_obs_sub_pred);
    EXPECT_EQ(packet_in.pitch_obs_sub_pred, packet2.pitch_obs_sub_pred);
    EXPECT_EQ(packet_in.yaw_obs_sub_pred, packet2.yaw_obs_sub_pred);
    EXPECT_EQ(packet_in.f_ib_n_x, packet2.f_ib_n_x);
    EXPECT_EQ(packet_in.f_ib_n_y, packet2.f_ib_n_y);
    EXPECT_EQ(packet_in.f_ib_n_z, packet2.f_ib_n_z);
    EXPECT_EQ(packet_in.g0_x, packet2.g0_x);
    EXPECT_EQ(packet_in.g0_y, packet2.g0_y);
    EXPECT_EQ(packet_in.g0_z, packet2.g0_z);
    EXPECT_EQ(packet_in.declination, packet2.declination);
    EXPECT_EQ(packet_in.inclination, packet2.inclination);
    EXPECT_EQ(packet_in.nm_earth_x, packet2.nm_earth_x);
    EXPECT_EQ(packet_in.nm_earth_y, packet2.nm_earth_y);
    EXPECT_EQ(packet_in.nm_earth_z, packet2.nm_earth_z);
    EXPECT_EQ(packet_in.nm_x, packet2.nm_x);
    EXPECT_EQ(packet_in.nm_y, packet2.nm_y);
    EXPECT_EQ(packet_in.nm_z, packet2.nm_z);
    EXPECT_EQ(packet_in.RN, packet2.RN);
    EXPECT_EQ(packet_in.RE, packet2.RE);
    EXPECT_EQ(packet_in.v_eb_n_obs_x, packet2.v_eb_n_obs_x);
    EXPECT_EQ(packet_in.v_eb_n_obs_y, packet2.v_eb_n_obs_y);
    EXPECT_EQ(packet_in.v_eb_n_obs_z, packet2.v_eb_n_obs_z);
    EXPECT_EQ(packet_in.p_eb_n_obs_x, packet2.p_eb_n_obs_x);
    EXPECT_EQ(packet_in.p_eb_n_obs_y, packet2.p_eb_n_obs_y);
    EXPECT_EQ(packet_in.p_eb_n_obs_z, packet2.p_eb_n_obs_z);
    EXPECT_EQ(packet_in.w_ib_b_norm, packet2.w_ib_b_norm);
    EXPECT_EQ(packet_in.f_ib_b_norm, packet2.f_ib_b_norm);
    EXPECT_EQ(packet_in.bm_norm, packet2.bm_norm);
    EXPECT_EQ(packet_in.time_used, packet2.time_used);
    EXPECT_EQ(packet_in.dt, packet2.dt);
    EXPECT_EQ(packet_in.static_state, packet2.static_state);
    EXPECT_EQ(packet_in.disturb_state, packet2.disturb_state);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, KF_XK_P1)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::KF_XK_P1 packet_in{};
    packet_in.Xk1 = {{ 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0 }};
    packet_in.Xk0 = {{ 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0, 872.0, 873.0, 874.0, 875.0, 876.0, 877.0, 878.0, 879.0, 880.0, 881.0, 882.0, 883.0, 884.0, 885.0, 886.0 }};

    mavlink::fppa::msg::KF_XK_P1 packet1{};
    mavlink::fppa::msg::KF_XK_P1 packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.Xk1, packet2.Xk1);
    EXPECT_EQ(packet1.Xk0, packet2.Xk0);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, KF_XK_P1)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_kf_xk_p1_t packet_c {
         { 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0 }, { 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0, 872.0, 873.0, 874.0, 875.0, 876.0, 877.0, 878.0, 879.0, 880.0, 881.0, 882.0, 883.0, 884.0, 885.0, 886.0 }
    };

    mavlink::fppa::msg::KF_XK_P1 packet_in{};
    packet_in.Xk1 = {{ 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0 }};
    packet_in.Xk0 = {{ 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0, 872.0, 873.0, 874.0, 875.0, 876.0, 877.0, 878.0, 879.0, 880.0, 881.0, 882.0, 883.0, 884.0, 885.0, 886.0 }};

    mavlink::fppa::msg::KF_XK_P1 packet2{};

    mavlink_msg_kf_xk_p1_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.Xk1, packet2.Xk1);
    EXPECT_EQ(packet_in.Xk0, packet2.Xk0);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, KF_XK_P2)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::KF_XK_P2 packet_in{};
    packet_in.delta_xk = {{ 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0 }};
    packet_in.xk_total = {{ 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0, 872.0, 873.0, 874.0, 875.0, 876.0, 877.0, 878.0, 879.0, 880.0, 881.0, 882.0, 883.0, 884.0, 885.0, 886.0 }};

    mavlink::fppa::msg::KF_XK_P2 packet1{};
    mavlink::fppa::msg::KF_XK_P2 packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.delta_xk, packet2.delta_xk);
    EXPECT_EQ(packet1.xk_total, packet2.xk_total);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, KF_XK_P2)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_kf_xk_p2_t packet_c {
         { 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0 }, { 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0, 872.0, 873.0, 874.0, 875.0, 876.0, 877.0, 878.0, 879.0, 880.0, 881.0, 882.0, 883.0, 884.0, 885.0, 886.0 }
    };

    mavlink::fppa::msg::KF_XK_P2 packet_in{};
    packet_in.delta_xk = {{ 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0 }};
    packet_in.xk_total = {{ 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0, 872.0, 873.0, 874.0, 875.0, 876.0, 877.0, 878.0, 879.0, 880.0, 881.0, 882.0, 883.0, 884.0, 885.0, 886.0 }};

    mavlink::fppa::msg::KF_XK_P2 packet2{};

    mavlink_msg_kf_xk_p2_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.delta_xk, packet2.delta_xk);
    EXPECT_EQ(packet_in.xk_total, packet2.xk_total);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, KF_P0Q)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::KF_P0Q packet_in{};
    packet_in.P0 = {{ 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0 }};
    packet_in.Q = {{ 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0, 872.0, 873.0, 874.0, 875.0, 876.0, 877.0, 878.0, 879.0, 880.0, 881.0, 882.0, 883.0, 884.0, 885.0, 886.0 }};

    mavlink::fppa::msg::KF_P0Q packet1{};
    mavlink::fppa::msg::KF_P0Q packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.P0, packet2.P0);
    EXPECT_EQ(packet1.Q, packet2.Q);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, KF_P0Q)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_kf_p0q_t packet_c {
         { 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0 }, { 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0, 872.0, 873.0, 874.0, 875.0, 876.0, 877.0, 878.0, 879.0, 880.0, 881.0, 882.0, 883.0, 884.0, 885.0, 886.0 }
    };

    mavlink::fppa::msg::KF_P0Q packet_in{};
    packet_in.P0 = {{ 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0 }};
    packet_in.Q = {{ 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0, 872.0, 873.0, 874.0, 875.0, 876.0, 877.0, 878.0, 879.0, 880.0, 881.0, 882.0, 883.0, 884.0, 885.0, 886.0 }};

    mavlink::fppa::msg::KF_P0Q packet2{};

    mavlink_msg_kf_p0q_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.P0, packet2.P0);
    EXPECT_EQ(packet_in.Q, packet2.Q);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, KF_ZK)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::KF_ZK packet_in{};
    packet_in.Zk = {{ 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0 }};
    packet_in.Hk = {{ 437.0, 438.0, 439.0, 440.0, 441.0, 442.0, 443.0, 444.0, 445.0, 446.0, 447.0, 448.0, 449.0, 450.0, 451.0 }};
    packet_in.Vk = {{ 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0 }};
    packet_in.R = {{ 1277.0, 1278.0, 1279.0, 1280.0, 1281.0, 1282.0, 1283.0, 1284.0, 1285.0, 1286.0, 1287.0, 1288.0, 1289.0, 1290.0, 1291.0 }};

    mavlink::fppa::msg::KF_ZK packet1{};
    mavlink::fppa::msg::KF_ZK packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.Zk, packet2.Zk);
    EXPECT_EQ(packet1.Hk, packet2.Hk);
    EXPECT_EQ(packet1.Vk, packet2.Vk);
    EXPECT_EQ(packet1.R, packet2.R);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, KF_ZK)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_kf_zk_t packet_c {
         { 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0 }, { 437.0, 438.0, 439.0, 440.0, 441.0, 442.0, 443.0, 444.0, 445.0, 446.0, 447.0, 448.0, 449.0, 450.0, 451.0 }, { 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0 }, { 1277.0, 1278.0, 1279.0, 1280.0, 1281.0, 1282.0, 1283.0, 1284.0, 1285.0, 1286.0, 1287.0, 1288.0, 1289.0, 1290.0, 1291.0 }
    };

    mavlink::fppa::msg::KF_ZK packet_in{};
    packet_in.Zk = {{ 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0 }};
    packet_in.Hk = {{ 437.0, 438.0, 439.0, 440.0, 441.0, 442.0, 443.0, 444.0, 445.0, 446.0, 447.0, 448.0, 449.0, 450.0, 451.0 }};
    packet_in.Vk = {{ 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0 }};
    packet_in.R = {{ 1277.0, 1278.0, 1279.0, 1280.0, 1281.0, 1282.0, 1283.0, 1284.0, 1285.0, 1286.0, 1287.0, 1288.0, 1289.0, 1290.0, 1291.0 }};

    mavlink::fppa::msg::KF_ZK packet2{};

    mavlink_msg_kf_zk_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.Zk, packet2.Zk);
    EXPECT_EQ(packet_in.Hk, packet2.Hk);
    EXPECT_EQ(packet_in.Vk, packet2.Vk);
    EXPECT_EQ(packet_in.R, packet2.R);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, KF_OTHER)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::KF_OTHER packet_in{};
    packet_in.Data = {{ 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0 }};

    mavlink::fppa::msg::KF_OTHER packet1{};
    mavlink::fppa::msg::KF_OTHER packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.Data, packet2.Data);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, KF_OTHER)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_kf_other_t packet_c {
         { 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0 }
    };

    mavlink::fppa::msg::KF_OTHER packet_in{};
    packet_in.Data = {{ 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0 }};

    mavlink::fppa::msg::KF_OTHER packet2{};

    mavlink_msg_kf_other_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.Data, packet2.Data);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, TRACKER_STATUS)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::TRACKER_STATUS packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.mode = 173;
    packet_in.auto_pos = 240;
    packet_in.slon = 73.0;
    packet_in.polar = 101.0;
    packet_in.llon = 129.0;
    packet_in.llat = 157.0;
    packet_in.res1 = 185.0;
    packet_in.res2 = 213.0;
    packet_in.res3 = 241.0;
    packet_in.res4 = 269.0;
    packet_in.res5 = 297.0;
    packet_in.res6 = 325.0;
    packet_in.res7 = 963499960;
    packet_in.sat_id = 963500168;

    mavlink::fppa::msg::TRACKER_STATUS packet1{};
    mavlink::fppa::msg::TRACKER_STATUS packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet1.mode, packet2.mode);
    EXPECT_EQ(packet1.auto_pos, packet2.auto_pos);
    EXPECT_EQ(packet1.slon, packet2.slon);
    EXPECT_EQ(packet1.polar, packet2.polar);
    EXPECT_EQ(packet1.llon, packet2.llon);
    EXPECT_EQ(packet1.llat, packet2.llat);
    EXPECT_EQ(packet1.res1, packet2.res1);
    EXPECT_EQ(packet1.res2, packet2.res2);
    EXPECT_EQ(packet1.res3, packet2.res3);
    EXPECT_EQ(packet1.res4, packet2.res4);
    EXPECT_EQ(packet1.res5, packet2.res5);
    EXPECT_EQ(packet1.res6, packet2.res6);
    EXPECT_EQ(packet1.res7, packet2.res7);
    EXPECT_EQ(packet1.sat_id, packet2.sat_id);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, TRACKER_STATUS)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_tracker_status_t packet_c {
         93372036854775807ULL, 73.0, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 269.0, 297.0, 325.0, 963499960, 963500168, 173, 240
    };

    mavlink::fppa::msg::TRACKER_STATUS packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.mode = 173;
    packet_in.auto_pos = 240;
    packet_in.slon = 73.0;
    packet_in.polar = 101.0;
    packet_in.llon = 129.0;
    packet_in.llat = 157.0;
    packet_in.res1 = 185.0;
    packet_in.res2 = 213.0;
    packet_in.res3 = 241.0;
    packet_in.res4 = 269.0;
    packet_in.res5 = 297.0;
    packet_in.res6 = 325.0;
    packet_in.res7 = 963499960;
    packet_in.sat_id = 963500168;

    mavlink::fppa::msg::TRACKER_STATUS packet2{};

    mavlink_msg_tracker_status_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet_in.mode, packet2.mode);
    EXPECT_EQ(packet_in.auto_pos, packet2.auto_pos);
    EXPECT_EQ(packet_in.slon, packet2.slon);
    EXPECT_EQ(packet_in.polar, packet2.polar);
    EXPECT_EQ(packet_in.llon, packet2.llon);
    EXPECT_EQ(packet_in.llat, packet2.llat);
    EXPECT_EQ(packet_in.res1, packet2.res1);
    EXPECT_EQ(packet_in.res2, packet2.res2);
    EXPECT_EQ(packet_in.res3, packet2.res3);
    EXPECT_EQ(packet_in.res4, packet2.res4);
    EXPECT_EQ(packet_in.res5, packet2.res5);
    EXPECT_EQ(packet_in.res6, packet2.res6);
    EXPECT_EQ(packet_in.res7, packet2.res7);
    EXPECT_EQ(packet_in.sat_id, packet2.sat_id);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, BUC_STATUS)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::BUC_STATUS packet_in{};
    packet_in.ws = 211;
    packet_in.sw = 22;
    packet_in.att = 17.0;
    packet_in.lo = 89;
    packet_in.temp = 18483;
    packet_in.power = 45.0;
    packet_in.gain = 73.0;
    packet_in.freq = 101.0;
    packet_in.res1 = 129.0;
    packet_in.res2 = 963498504;

    mavlink::fppa::msg::BUC_STATUS packet1{};
    mavlink::fppa::msg::BUC_STATUS packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.ws, packet2.ws);
    EXPECT_EQ(packet1.sw, packet2.sw);
    EXPECT_EQ(packet1.att, packet2.att);
    EXPECT_EQ(packet1.lo, packet2.lo);
    EXPECT_EQ(packet1.temp, packet2.temp);
    EXPECT_EQ(packet1.power, packet2.power);
    EXPECT_EQ(packet1.gain, packet2.gain);
    EXPECT_EQ(packet1.freq, packet2.freq);
    EXPECT_EQ(packet1.res1, packet2.res1);
    EXPECT_EQ(packet1.res2, packet2.res2);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, BUC_STATUS)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_buc_status_t packet_c {
         17.0, 45.0, 73.0, 101.0, 129.0, 963498504, 18483, 211, 22, 89
    };

    mavlink::fppa::msg::BUC_STATUS packet_in{};
    packet_in.ws = 211;
    packet_in.sw = 22;
    packet_in.att = 17.0;
    packet_in.lo = 89;
    packet_in.temp = 18483;
    packet_in.power = 45.0;
    packet_in.gain = 73.0;
    packet_in.freq = 101.0;
    packet_in.res1 = 129.0;
    packet_in.res2 = 963498504;

    mavlink::fppa::msg::BUC_STATUS packet2{};

    mavlink_msg_buc_status_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.ws, packet2.ws);
    EXPECT_EQ(packet_in.sw, packet2.sw);
    EXPECT_EQ(packet_in.att, packet2.att);
    EXPECT_EQ(packet_in.lo, packet2.lo);
    EXPECT_EQ(packet_in.temp, packet2.temp);
    EXPECT_EQ(packet_in.power, packet2.power);
    EXPECT_EQ(packet_in.gain, packet2.gain);
    EXPECT_EQ(packet_in.freq, packet2.freq);
    EXPECT_EQ(packet_in.res1, packet2.res1);
    EXPECT_EQ(packet_in.res2, packet2.res2);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, GNSS_DATA)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::GNSS_DATA packet_in{};
    packet_in.time = 93372036854775807ULL;
    packet_in.dt = 963497880;
    packet_in.lon = 101.0;
    packet_in.lat = 129.0;
    packet_in.height = 157.0;
    packet_in.east = 185.0;
    packet_in.north = 213.0;
    packet_in.up = 241.0;
    packet_in.eastVel = 269.0;
    packet_in.northVel = 297.0;
    packet_in.upVel = 325.0;
    packet_in.heading = 353.0;
    packet_in.pitch = 381.0;
    packet_in.tracktrue = 409.0;
    packet_in.vel = 437.0;
    packet_in.roll = 465.0;
    packet_in.pos_qual = 963501000;
    packet_in.heading_qual = 963501208;
    packet_in.satNum1 = 963501416;
    packet_in.satNum2 = 963501624;
    packet_in.gps_Num = 963501832;
    packet_in.bds_Num = 963502040;
    packet_in.glo_Num = 963502248;
    packet_in.pdop = 689.0;
    packet_in.hdop = 717.0;
    packet_in.vdop = 745.0;
    packet_in.year = 193;
    packet_in.month = 4;
    packet_in.day = 71;
    packet_in.hour = 138;
    packet_in.minute = 205;
    packet_in.second = 16;
    packet_in.data1 = 773.0;
    packet_in.data2 = 801.0;
    packet_in.data3 = 829.0;
    packet_in.data4 = 857.0;
    packet_in.data5 = 885.0;
    packet_in.data6 = 913.0;
    packet_in.data7 = 941.0;
    packet_in.data8 = 969.0;
    packet_in.data9 = 997.0;
    packet_in.data10 = 1025.0;

    mavlink::fppa::msg::GNSS_DATA packet1{};
    mavlink::fppa::msg::GNSS_DATA packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.time, packet2.time);
    EXPECT_EQ(packet1.dt, packet2.dt);
    EXPECT_EQ(packet1.lon, packet2.lon);
    EXPECT_EQ(packet1.lat, packet2.lat);
    EXPECT_EQ(packet1.height, packet2.height);
    EXPECT_EQ(packet1.east, packet2.east);
    EXPECT_EQ(packet1.north, packet2.north);
    EXPECT_EQ(packet1.up, packet2.up);
    EXPECT_EQ(packet1.eastVel, packet2.eastVel);
    EXPECT_EQ(packet1.northVel, packet2.northVel);
    EXPECT_EQ(packet1.upVel, packet2.upVel);
    EXPECT_EQ(packet1.heading, packet2.heading);
    EXPECT_EQ(packet1.pitch, packet2.pitch);
    EXPECT_EQ(packet1.tracktrue, packet2.tracktrue);
    EXPECT_EQ(packet1.vel, packet2.vel);
    EXPECT_EQ(packet1.roll, packet2.roll);
    EXPECT_EQ(packet1.pos_qual, packet2.pos_qual);
    EXPECT_EQ(packet1.heading_qual, packet2.heading_qual);
    EXPECT_EQ(packet1.satNum1, packet2.satNum1);
    EXPECT_EQ(packet1.satNum2, packet2.satNum2);
    EXPECT_EQ(packet1.gps_Num, packet2.gps_Num);
    EXPECT_EQ(packet1.bds_Num, packet2.bds_Num);
    EXPECT_EQ(packet1.glo_Num, packet2.glo_Num);
    EXPECT_EQ(packet1.pdop, packet2.pdop);
    EXPECT_EQ(packet1.hdop, packet2.hdop);
    EXPECT_EQ(packet1.vdop, packet2.vdop);
    EXPECT_EQ(packet1.year, packet2.year);
    EXPECT_EQ(packet1.month, packet2.month);
    EXPECT_EQ(packet1.day, packet2.day);
    EXPECT_EQ(packet1.hour, packet2.hour);
    EXPECT_EQ(packet1.minute, packet2.minute);
    EXPECT_EQ(packet1.second, packet2.second);
    EXPECT_EQ(packet1.data1, packet2.data1);
    EXPECT_EQ(packet1.data2, packet2.data2);
    EXPECT_EQ(packet1.data3, packet2.data3);
    EXPECT_EQ(packet1.data4, packet2.data4);
    EXPECT_EQ(packet1.data5, packet2.data5);
    EXPECT_EQ(packet1.data6, packet2.data6);
    EXPECT_EQ(packet1.data7, packet2.data7);
    EXPECT_EQ(packet1.data8, packet2.data8);
    EXPECT_EQ(packet1.data9, packet2.data9);
    EXPECT_EQ(packet1.data10, packet2.data10);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, GNSS_DATA)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_gnss_data_t packet_c {
         93372036854775807ULL, 963497880, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 269.0, 297.0, 325.0, 353.0, 381.0, 409.0, 437.0, 465.0, 963501000, 963501208, 963501416, 963501624, 963501832, 963502040, 963502248, 689.0, 717.0, 745.0, 773.0, 801.0, 829.0, 857.0, 885.0, 913.0, 941.0, 969.0, 997.0, 1025.0, 193, 4, 71, 138, 205, 16
    };

    mavlink::fppa::msg::GNSS_DATA packet_in{};
    packet_in.time = 93372036854775807ULL;
    packet_in.dt = 963497880;
    packet_in.lon = 101.0;
    packet_in.lat = 129.0;
    packet_in.height = 157.0;
    packet_in.east = 185.0;
    packet_in.north = 213.0;
    packet_in.up = 241.0;
    packet_in.eastVel = 269.0;
    packet_in.northVel = 297.0;
    packet_in.upVel = 325.0;
    packet_in.heading = 353.0;
    packet_in.pitch = 381.0;
    packet_in.tracktrue = 409.0;
    packet_in.vel = 437.0;
    packet_in.roll = 465.0;
    packet_in.pos_qual = 963501000;
    packet_in.heading_qual = 963501208;
    packet_in.satNum1 = 963501416;
    packet_in.satNum2 = 963501624;
    packet_in.gps_Num = 963501832;
    packet_in.bds_Num = 963502040;
    packet_in.glo_Num = 963502248;
    packet_in.pdop = 689.0;
    packet_in.hdop = 717.0;
    packet_in.vdop = 745.0;
    packet_in.year = 193;
    packet_in.month = 4;
    packet_in.day = 71;
    packet_in.hour = 138;
    packet_in.minute = 205;
    packet_in.second = 16;
    packet_in.data1 = 773.0;
    packet_in.data2 = 801.0;
    packet_in.data3 = 829.0;
    packet_in.data4 = 857.0;
    packet_in.data5 = 885.0;
    packet_in.data6 = 913.0;
    packet_in.data7 = 941.0;
    packet_in.data8 = 969.0;
    packet_in.data9 = 997.0;
    packet_in.data10 = 1025.0;

    mavlink::fppa::msg::GNSS_DATA packet2{};

    mavlink_msg_gnss_data_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.time, packet2.time);
    EXPECT_EQ(packet_in.dt, packet2.dt);
    EXPECT_EQ(packet_in.lon, packet2.lon);
    EXPECT_EQ(packet_in.lat, packet2.lat);
    EXPECT_EQ(packet_in.height, packet2.height);
    EXPECT_EQ(packet_in.east, packet2.east);
    EXPECT_EQ(packet_in.north, packet2.north);
    EXPECT_EQ(packet_in.up, packet2.up);
    EXPECT_EQ(packet_in.eastVel, packet2.eastVel);
    EXPECT_EQ(packet_in.northVel, packet2.northVel);
    EXPECT_EQ(packet_in.upVel, packet2.upVel);
    EXPECT_EQ(packet_in.heading, packet2.heading);
    EXPECT_EQ(packet_in.pitch, packet2.pitch);
    EXPECT_EQ(packet_in.tracktrue, packet2.tracktrue);
    EXPECT_EQ(packet_in.vel, packet2.vel);
    EXPECT_EQ(packet_in.roll, packet2.roll);
    EXPECT_EQ(packet_in.pos_qual, packet2.pos_qual);
    EXPECT_EQ(packet_in.heading_qual, packet2.heading_qual);
    EXPECT_EQ(packet_in.satNum1, packet2.satNum1);
    EXPECT_EQ(packet_in.satNum2, packet2.satNum2);
    EXPECT_EQ(packet_in.gps_Num, packet2.gps_Num);
    EXPECT_EQ(packet_in.bds_Num, packet2.bds_Num);
    EXPECT_EQ(packet_in.glo_Num, packet2.glo_Num);
    EXPECT_EQ(packet_in.pdop, packet2.pdop);
    EXPECT_EQ(packet_in.hdop, packet2.hdop);
    EXPECT_EQ(packet_in.vdop, packet2.vdop);
    EXPECT_EQ(packet_in.year, packet2.year);
    EXPECT_EQ(packet_in.month, packet2.month);
    EXPECT_EQ(packet_in.day, packet2.day);
    EXPECT_EQ(packet_in.hour, packet2.hour);
    EXPECT_EQ(packet_in.minute, packet2.minute);
    EXPECT_EQ(packet_in.second, packet2.second);
    EXPECT_EQ(packet_in.data1, packet2.data1);
    EXPECT_EQ(packet_in.data2, packet2.data2);
    EXPECT_EQ(packet_in.data3, packet2.data3);
    EXPECT_EQ(packet_in.data4, packet2.data4);
    EXPECT_EQ(packet_in.data5, packet2.data5);
    EXPECT_EQ(packet_in.data6, packet2.data6);
    EXPECT_EQ(packet_in.data7, packet2.data7);
    EXPECT_EQ(packet_in.data8, packet2.data8);
    EXPECT_EQ(packet_in.data9, packet2.data9);
    EXPECT_EQ(packet_in.data10, packet2.data10);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, FO_GYRO)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::FO_GYRO packet_in{};
    packet_in.state = 963497464;
    packet_in.wib = {{ 45.0, 46.0, 47.0 }};
    packet_in.temprature = 129.0;

    mavlink::fppa::msg::FO_GYRO packet1{};
    mavlink::fppa::msg::FO_GYRO packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.state, packet2.state);
    EXPECT_EQ(packet1.wib, packet2.wib);
    EXPECT_EQ(packet1.temprature, packet2.temprature);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, FO_GYRO)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_fo_gyro_t packet_c {
         963497464, { 45.0, 46.0, 47.0 }, 129.0
    };

    mavlink::fppa::msg::FO_GYRO packet_in{};
    packet_in.state = 963497464;
    packet_in.wib = {{ 45.0, 46.0, 47.0 }};
    packet_in.temprature = 129.0;

    mavlink::fppa::msg::FO_GYRO packet2{};

    mavlink_msg_fo_gyro_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.state, packet2.state);
    EXPECT_EQ(packet_in.wib, packet2.wib);
    EXPECT_EQ(packet_in.temprature, packet2.temprature);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, BEACON_REQUEST)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::BEACON_REQUEST packet_in{};
    packet_in.cmd = 211;
    packet_in.dvb_feed_volt = 22;
    packet_in.dvb_22k = 89;
    packet_in.dvb_period = 156;
    packet_in.dvb_id = 223;
    packet_in.dvb_freq = 17.0;
    packet_in.dvb_symb = 963497672;
    packet_in.dvb_rng = 963497880;
    packet_in.dvb_mcod = 34;
    packet_in.dvb_roll = 101;
    packet_in.dvb_std = 168;
    packet_in.dvb_alg = 235;
    packet_in.dvb_pr = 46;
    packet_in.beacon_feed_volt = 113;
    packet_in.beacon_22k = 180;
    packet_in.beacon_period = 247;
    packet_in.beacon_freq = 101.0;
    packet_in.beacon_rng = 58;
    packet_in.radio_feed_volt = 125;
    packet_in.radio_22k = 192;
    packet_in.radio_period = 3;
    packet_in.radio_freq = 129.0;
    packet_in.radio_symb = 963498504;
    packet_in.radio_scan_rng = 18483;
    packet_in.radio_roll = 70;

    mavlink::fppa::msg::BEACON_REQUEST packet1{};
    mavlink::fppa::msg::BEACON_REQUEST packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.cmd, packet2.cmd);
    EXPECT_EQ(packet1.dvb_feed_volt, packet2.dvb_feed_volt);
    EXPECT_EQ(packet1.dvb_22k, packet2.dvb_22k);
    EXPECT_EQ(packet1.dvb_period, packet2.dvb_period);
    EXPECT_EQ(packet1.dvb_id, packet2.dvb_id);
    EXPECT_EQ(packet1.dvb_freq, packet2.dvb_freq);
    EXPECT_EQ(packet1.dvb_symb, packet2.dvb_symb);
    EXPECT_EQ(packet1.dvb_rng, packet2.dvb_rng);
    EXPECT_EQ(packet1.dvb_mcod, packet2.dvb_mcod);
    EXPECT_EQ(packet1.dvb_roll, packet2.dvb_roll);
    EXPECT_EQ(packet1.dvb_std, packet2.dvb_std);
    EXPECT_EQ(packet1.dvb_alg, packet2.dvb_alg);
    EXPECT_EQ(packet1.dvb_pr, packet2.dvb_pr);
    EXPECT_EQ(packet1.beacon_feed_volt, packet2.beacon_feed_volt);
    EXPECT_EQ(packet1.beacon_22k, packet2.beacon_22k);
    EXPECT_EQ(packet1.beacon_period, packet2.beacon_period);
    EXPECT_EQ(packet1.beacon_freq, packet2.beacon_freq);
    EXPECT_EQ(packet1.beacon_rng, packet2.beacon_rng);
    EXPECT_EQ(packet1.radio_feed_volt, packet2.radio_feed_volt);
    EXPECT_EQ(packet1.radio_22k, packet2.radio_22k);
    EXPECT_EQ(packet1.radio_period, packet2.radio_period);
    EXPECT_EQ(packet1.radio_freq, packet2.radio_freq);
    EXPECT_EQ(packet1.radio_symb, packet2.radio_symb);
    EXPECT_EQ(packet1.radio_scan_rng, packet2.radio_scan_rng);
    EXPECT_EQ(packet1.radio_roll, packet2.radio_roll);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, BEACON_REQUEST)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_beacon_request_t packet_c {
         17.0, 963497672, 963497880, 101.0, 129.0, 963498504, 18483, 211, 22, 89, 156, 223, 34, 101, 168, 235, 46, 113, 180, 247, 58, 125, 192, 3, 70
    };

    mavlink::fppa::msg::BEACON_REQUEST packet_in{};
    packet_in.cmd = 211;
    packet_in.dvb_feed_volt = 22;
    packet_in.dvb_22k = 89;
    packet_in.dvb_period = 156;
    packet_in.dvb_id = 223;
    packet_in.dvb_freq = 17.0;
    packet_in.dvb_symb = 963497672;
    packet_in.dvb_rng = 963497880;
    packet_in.dvb_mcod = 34;
    packet_in.dvb_roll = 101;
    packet_in.dvb_std = 168;
    packet_in.dvb_alg = 235;
    packet_in.dvb_pr = 46;
    packet_in.beacon_feed_volt = 113;
    packet_in.beacon_22k = 180;
    packet_in.beacon_period = 247;
    packet_in.beacon_freq = 101.0;
    packet_in.beacon_rng = 58;
    packet_in.radio_feed_volt = 125;
    packet_in.radio_22k = 192;
    packet_in.radio_period = 3;
    packet_in.radio_freq = 129.0;
    packet_in.radio_symb = 963498504;
    packet_in.radio_scan_rng = 18483;
    packet_in.radio_roll = 70;

    mavlink::fppa::msg::BEACON_REQUEST packet2{};

    mavlink_msg_beacon_request_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.cmd, packet2.cmd);
    EXPECT_EQ(packet_in.dvb_feed_volt, packet2.dvb_feed_volt);
    EXPECT_EQ(packet_in.dvb_22k, packet2.dvb_22k);
    EXPECT_EQ(packet_in.dvb_period, packet2.dvb_period);
    EXPECT_EQ(packet_in.dvb_id, packet2.dvb_id);
    EXPECT_EQ(packet_in.dvb_freq, packet2.dvb_freq);
    EXPECT_EQ(packet_in.dvb_symb, packet2.dvb_symb);
    EXPECT_EQ(packet_in.dvb_rng, packet2.dvb_rng);
    EXPECT_EQ(packet_in.dvb_mcod, packet2.dvb_mcod);
    EXPECT_EQ(packet_in.dvb_roll, packet2.dvb_roll);
    EXPECT_EQ(packet_in.dvb_std, packet2.dvb_std);
    EXPECT_EQ(packet_in.dvb_alg, packet2.dvb_alg);
    EXPECT_EQ(packet_in.dvb_pr, packet2.dvb_pr);
    EXPECT_EQ(packet_in.beacon_feed_volt, packet2.beacon_feed_volt);
    EXPECT_EQ(packet_in.beacon_22k, packet2.beacon_22k);
    EXPECT_EQ(packet_in.beacon_period, packet2.beacon_period);
    EXPECT_EQ(packet_in.beacon_freq, packet2.beacon_freq);
    EXPECT_EQ(packet_in.beacon_rng, packet2.beacon_rng);
    EXPECT_EQ(packet_in.radio_feed_volt, packet2.radio_feed_volt);
    EXPECT_EQ(packet_in.radio_22k, packet2.radio_22k);
    EXPECT_EQ(packet_in.radio_period, packet2.radio_period);
    EXPECT_EQ(packet_in.radio_freq, packet2.radio_freq);
    EXPECT_EQ(packet_in.radio_symb, packet2.radio_symb);
    EXPECT_EQ(packet_in.radio_scan_rng, packet2.radio_scan_rng);
    EXPECT_EQ(packet_in.radio_roll, packet2.radio_roll);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, BEACON_RESPONSE)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::BEACON_RESPONSE packet_in{};
    packet_in.status = 963497464;
    packet_in.res1 = 963497672;
    packet_in.cmd = 235;
    packet_in.dvb_feed_volt = 46;
    packet_in.dvb_22k = 113;
    packet_in.dvb_period = 180;
    packet_in.dvb_id = 247;
    packet_in.dvb_freq = 73.0;
    packet_in.dvb_symb = 963498088;
    packet_in.dvb_rng = 963498296;
    packet_in.dvb_mcod = 58;
    packet_in.dvb_roll = 125;
    packet_in.dvb_std = 192;
    packet_in.dvb_alg = 3;
    packet_in.dvb_pr = 70;
    packet_in.beacon_feed_volt = 137;
    packet_in.beacon_22k = 204;
    packet_in.beacon_period = 15;
    packet_in.beacon_freq = 157.0;
    packet_in.beacon_rng = 82;
    packet_in.radio_feed_volt = 149;
    packet_in.radio_22k = 216;
    packet_in.radio_period = 27;
    packet_in.radio_freq = 185.0;
    packet_in.radio_symb = 963498920;
    packet_in.radio_scan_rng = 18899;
    packet_in.radio_roll = 94;
    packet_in.ascii_info = {{ 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220 }};

    mavlink::fppa::msg::BEACON_RESPONSE packet1{};
    mavlink::fppa::msg::BEACON_RESPONSE packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.status, packet2.status);
    EXPECT_EQ(packet1.res1, packet2.res1);
    EXPECT_EQ(packet1.cmd, packet2.cmd);
    EXPECT_EQ(packet1.dvb_feed_volt, packet2.dvb_feed_volt);
    EXPECT_EQ(packet1.dvb_22k, packet2.dvb_22k);
    EXPECT_EQ(packet1.dvb_period, packet2.dvb_period);
    EXPECT_EQ(packet1.dvb_id, packet2.dvb_id);
    EXPECT_EQ(packet1.dvb_freq, packet2.dvb_freq);
    EXPECT_EQ(packet1.dvb_symb, packet2.dvb_symb);
    EXPECT_EQ(packet1.dvb_rng, packet2.dvb_rng);
    EXPECT_EQ(packet1.dvb_mcod, packet2.dvb_mcod);
    EXPECT_EQ(packet1.dvb_roll, packet2.dvb_roll);
    EXPECT_EQ(packet1.dvb_std, packet2.dvb_std);
    EXPECT_EQ(packet1.dvb_alg, packet2.dvb_alg);
    EXPECT_EQ(packet1.dvb_pr, packet2.dvb_pr);
    EXPECT_EQ(packet1.beacon_feed_volt, packet2.beacon_feed_volt);
    EXPECT_EQ(packet1.beacon_22k, packet2.beacon_22k);
    EXPECT_EQ(packet1.beacon_period, packet2.beacon_period);
    EXPECT_EQ(packet1.beacon_freq, packet2.beacon_freq);
    EXPECT_EQ(packet1.beacon_rng, packet2.beacon_rng);
    EXPECT_EQ(packet1.radio_feed_volt, packet2.radio_feed_volt);
    EXPECT_EQ(packet1.radio_22k, packet2.radio_22k);
    EXPECT_EQ(packet1.radio_period, packet2.radio_period);
    EXPECT_EQ(packet1.radio_freq, packet2.radio_freq);
    EXPECT_EQ(packet1.radio_symb, packet2.radio_symb);
    EXPECT_EQ(packet1.radio_scan_rng, packet2.radio_scan_rng);
    EXPECT_EQ(packet1.radio_roll, packet2.radio_roll);
    EXPECT_EQ(packet1.ascii_info, packet2.ascii_info);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, BEACON_RESPONSE)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_beacon_response_t packet_c {
         963497464, 963497672, 73.0, 963498088, 963498296, 157.0, 185.0, 963498920, 18899, 235, 46, 113, 180, 247, 58, 125, 192, 3, 70, 137, 204, 15, 82, 149, 216, 27, 94, { 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220 }
    };

    mavlink::fppa::msg::BEACON_RESPONSE packet_in{};
    packet_in.status = 963497464;
    packet_in.res1 = 963497672;
    packet_in.cmd = 235;
    packet_in.dvb_feed_volt = 46;
    packet_in.dvb_22k = 113;
    packet_in.dvb_period = 180;
    packet_in.dvb_id = 247;
    packet_in.dvb_freq = 73.0;
    packet_in.dvb_symb = 963498088;
    packet_in.dvb_rng = 963498296;
    packet_in.dvb_mcod = 58;
    packet_in.dvb_roll = 125;
    packet_in.dvb_std = 192;
    packet_in.dvb_alg = 3;
    packet_in.dvb_pr = 70;
    packet_in.beacon_feed_volt = 137;
    packet_in.beacon_22k = 204;
    packet_in.beacon_period = 15;
    packet_in.beacon_freq = 157.0;
    packet_in.beacon_rng = 82;
    packet_in.radio_feed_volt = 149;
    packet_in.radio_22k = 216;
    packet_in.radio_period = 27;
    packet_in.radio_freq = 185.0;
    packet_in.radio_symb = 963498920;
    packet_in.radio_scan_rng = 18899;
    packet_in.radio_roll = 94;
    packet_in.ascii_info = {{ 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220 }};

    mavlink::fppa::msg::BEACON_RESPONSE packet2{};

    mavlink_msg_beacon_response_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.status, packet2.status);
    EXPECT_EQ(packet_in.res1, packet2.res1);
    EXPECT_EQ(packet_in.cmd, packet2.cmd);
    EXPECT_EQ(packet_in.dvb_feed_volt, packet2.dvb_feed_volt);
    EXPECT_EQ(packet_in.dvb_22k, packet2.dvb_22k);
    EXPECT_EQ(packet_in.dvb_period, packet2.dvb_period);
    EXPECT_EQ(packet_in.dvb_id, packet2.dvb_id);
    EXPECT_EQ(packet_in.dvb_freq, packet2.dvb_freq);
    EXPECT_EQ(packet_in.dvb_symb, packet2.dvb_symb);
    EXPECT_EQ(packet_in.dvb_rng, packet2.dvb_rng);
    EXPECT_EQ(packet_in.dvb_mcod, packet2.dvb_mcod);
    EXPECT_EQ(packet_in.dvb_roll, packet2.dvb_roll);
    EXPECT_EQ(packet_in.dvb_std, packet2.dvb_std);
    EXPECT_EQ(packet_in.dvb_alg, packet2.dvb_alg);
    EXPECT_EQ(packet_in.dvb_pr, packet2.dvb_pr);
    EXPECT_EQ(packet_in.beacon_feed_volt, packet2.beacon_feed_volt);
    EXPECT_EQ(packet_in.beacon_22k, packet2.beacon_22k);
    EXPECT_EQ(packet_in.beacon_period, packet2.beacon_period);
    EXPECT_EQ(packet_in.beacon_freq, packet2.beacon_freq);
    EXPECT_EQ(packet_in.beacon_rng, packet2.beacon_rng);
    EXPECT_EQ(packet_in.radio_feed_volt, packet2.radio_feed_volt);
    EXPECT_EQ(packet_in.radio_22k, packet2.radio_22k);
    EXPECT_EQ(packet_in.radio_period, packet2.radio_period);
    EXPECT_EQ(packet_in.radio_freq, packet2.radio_freq);
    EXPECT_EQ(packet_in.radio_symb, packet2.radio_symb);
    EXPECT_EQ(packet_in.radio_scan_rng, packet2.radio_scan_rng);
    EXPECT_EQ(packet_in.radio_roll, packet2.radio_roll);
    EXPECT_EQ(packet_in.ascii_info, packet2.ascii_info);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, MAVLINK_COMM_CTRL)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::MAVLINK_COMM_CTRL packet_in{};
    packet_in.comm_sw = 5;
    packet_in.res1 = 72;
    packet_in.res2 = 139;

    mavlink::fppa::msg::MAVLINK_COMM_CTRL packet1{};
    mavlink::fppa::msg::MAVLINK_COMM_CTRL packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.comm_sw, packet2.comm_sw);
    EXPECT_EQ(packet1.res1, packet2.res1);
    EXPECT_EQ(packet1.res2, packet2.res2);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, MAVLINK_COMM_CTRL)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_mavlink_comm_ctrl_t packet_c {
         5, 72, 139
    };

    mavlink::fppa::msg::MAVLINK_COMM_CTRL packet_in{};
    packet_in.comm_sw = 5;
    packet_in.res1 = 72;
    packet_in.res2 = 139;

    mavlink::fppa::msg::MAVLINK_COMM_CTRL packet2{};

    mavlink_msg_mavlink_comm_ctrl_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.comm_sw, packet2.comm_sw);
    EXPECT_EQ(packet_in.res1, packet2.res1);
    EXPECT_EQ(packet_in.res2, packet2.res2);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, BUC_REQUEST)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::BUC_REQUEST packet_in{};
    packet_in.cmd = 211;
    packet_in.sw = 22;
    packet_in.att = 17.0;
    packet_in.lo = 89;
    packet_in.temp = 18483;
    packet_in.power = 45.0;
    packet_in.gain = 73.0;
    packet_in.freq = 101.0;
    packet_in.res1 = 129.0;
    packet_in.res2 = 963498504;

    mavlink::fppa::msg::BUC_REQUEST packet1{};
    mavlink::fppa::msg::BUC_REQUEST packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.cmd, packet2.cmd);
    EXPECT_EQ(packet1.sw, packet2.sw);
    EXPECT_EQ(packet1.att, packet2.att);
    EXPECT_EQ(packet1.lo, packet2.lo);
    EXPECT_EQ(packet1.temp, packet2.temp);
    EXPECT_EQ(packet1.power, packet2.power);
    EXPECT_EQ(packet1.gain, packet2.gain);
    EXPECT_EQ(packet1.freq, packet2.freq);
    EXPECT_EQ(packet1.res1, packet2.res1);
    EXPECT_EQ(packet1.res2, packet2.res2);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, BUC_REQUEST)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_buc_request_t packet_c {
         17.0, 45.0, 73.0, 101.0, 129.0, 963498504, 18483, 211, 22, 89
    };

    mavlink::fppa::msg::BUC_REQUEST packet_in{};
    packet_in.cmd = 211;
    packet_in.sw = 22;
    packet_in.att = 17.0;
    packet_in.lo = 89;
    packet_in.temp = 18483;
    packet_in.power = 45.0;
    packet_in.gain = 73.0;
    packet_in.freq = 101.0;
    packet_in.res1 = 129.0;
    packet_in.res2 = 963498504;

    mavlink::fppa::msg::BUC_REQUEST packet2{};

    mavlink_msg_buc_request_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.cmd, packet2.cmd);
    EXPECT_EQ(packet_in.sw, packet2.sw);
    EXPECT_EQ(packet_in.att, packet2.att);
    EXPECT_EQ(packet_in.lo, packet2.lo);
    EXPECT_EQ(packet_in.temp, packet2.temp);
    EXPECT_EQ(packet_in.power, packet2.power);
    EXPECT_EQ(packet_in.gain, packet2.gain);
    EXPECT_EQ(packet_in.freq, packet2.freq);
    EXPECT_EQ(packet_in.res1, packet2.res1);
    EXPECT_EQ(packet_in.res2, packet2.res2);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, BUC_RESPONSE)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::BUC_RESPONSE packet_in{};
    packet_in.status = 211;
    packet_in.cmd = 22;
    packet_in.sw = 89;
    packet_in.att = 17.0;
    packet_in.lo = 156;
    packet_in.temp = 18483;
    packet_in.power = 45.0;
    packet_in.gain = 73.0;
    packet_in.freq = 101.0;
    packet_in.res1 = 129.0;
    packet_in.res2 = 963498504;

    mavlink::fppa::msg::BUC_RESPONSE packet1{};
    mavlink::fppa::msg::BUC_RESPONSE packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.status, packet2.status);
    EXPECT_EQ(packet1.cmd, packet2.cmd);
    EXPECT_EQ(packet1.sw, packet2.sw);
    EXPECT_EQ(packet1.att, packet2.att);
    EXPECT_EQ(packet1.lo, packet2.lo);
    EXPECT_EQ(packet1.temp, packet2.temp);
    EXPECT_EQ(packet1.power, packet2.power);
    EXPECT_EQ(packet1.gain, packet2.gain);
    EXPECT_EQ(packet1.freq, packet2.freq);
    EXPECT_EQ(packet1.res1, packet2.res1);
    EXPECT_EQ(packet1.res2, packet2.res2);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, BUC_RESPONSE)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_buc_response_t packet_c {
         17.0, 45.0, 73.0, 101.0, 129.0, 963498504, 18483, 211, 22, 89, 156
    };

    mavlink::fppa::msg::BUC_RESPONSE packet_in{};
    packet_in.status = 211;
    packet_in.cmd = 22;
    packet_in.sw = 89;
    packet_in.att = 17.0;
    packet_in.lo = 156;
    packet_in.temp = 18483;
    packet_in.power = 45.0;
    packet_in.gain = 73.0;
    packet_in.freq = 101.0;
    packet_in.res1 = 129.0;
    packet_in.res2 = 963498504;

    mavlink::fppa::msg::BUC_RESPONSE packet2{};

    mavlink_msg_buc_response_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.status, packet2.status);
    EXPECT_EQ(packet_in.cmd, packet2.cmd);
    EXPECT_EQ(packet_in.sw, packet2.sw);
    EXPECT_EQ(packet_in.att, packet2.att);
    EXPECT_EQ(packet_in.lo, packet2.lo);
    EXPECT_EQ(packet_in.temp, packet2.temp);
    EXPECT_EQ(packet_in.power, packet2.power);
    EXPECT_EQ(packet_in.gain, packet2.gain);
    EXPECT_EQ(packet_in.freq, packet2.freq);
    EXPECT_EQ(packet_in.res1, packet2.res1);
    EXPECT_EQ(packet_in.res2, packet2.res2);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, SATS_REQUEST)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::SATS_REQUEST packet_in{};
    packet_in.cmd = 125;
    packet_in.sat_id = 963497464;
    packet_in.name = {{ 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 }};
    packet_in.slon = 45.0;
    packet_in.llon = 73.0;
    packet_in.llat = 101.0;
    packet_in.auto_gps = 128;
    packet_in.beacon = 195;
    packet_in.down_freq = 129.0;
    packet_in.down_symb = 157.0;
    packet_in.down_polar = 185.0;
    packet_in.up_freq = 213.0;
    packet_in.up_polar = 241.0;
    packet_in.res1 = 269.0;
    packet_in.res2 = 6;

    mavlink::fppa::msg::SATS_REQUEST packet1{};
    mavlink::fppa::msg::SATS_REQUEST packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.cmd, packet2.cmd);
    EXPECT_EQ(packet1.sat_id, packet2.sat_id);
    EXPECT_EQ(packet1.name, packet2.name);
    EXPECT_EQ(packet1.slon, packet2.slon);
    EXPECT_EQ(packet1.llon, packet2.llon);
    EXPECT_EQ(packet1.llat, packet2.llat);
    EXPECT_EQ(packet1.auto_gps, packet2.auto_gps);
    EXPECT_EQ(packet1.beacon, packet2.beacon);
    EXPECT_EQ(packet1.down_freq, packet2.down_freq);
    EXPECT_EQ(packet1.down_symb, packet2.down_symb);
    EXPECT_EQ(packet1.down_polar, packet2.down_polar);
    EXPECT_EQ(packet1.up_freq, packet2.up_freq);
    EXPECT_EQ(packet1.up_polar, packet2.up_polar);
    EXPECT_EQ(packet1.res1, packet2.res1);
    EXPECT_EQ(packet1.res2, packet2.res2);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, SATS_REQUEST)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_sats_request_t packet_c {
         963497464, 45.0, 73.0, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 269.0, 125, { 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 }, 128, 195, 6
    };

    mavlink::fppa::msg::SATS_REQUEST packet_in{};
    packet_in.cmd = 125;
    packet_in.sat_id = 963497464;
    packet_in.name = {{ 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 }};
    packet_in.slon = 45.0;
    packet_in.llon = 73.0;
    packet_in.llat = 101.0;
    packet_in.auto_gps = 128;
    packet_in.beacon = 195;
    packet_in.down_freq = 129.0;
    packet_in.down_symb = 157.0;
    packet_in.down_polar = 185.0;
    packet_in.up_freq = 213.0;
    packet_in.up_polar = 241.0;
    packet_in.res1 = 269.0;
    packet_in.res2 = 6;

    mavlink::fppa::msg::SATS_REQUEST packet2{};

    mavlink_msg_sats_request_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.cmd, packet2.cmd);
    EXPECT_EQ(packet_in.sat_id, packet2.sat_id);
    EXPECT_EQ(packet_in.name, packet2.name);
    EXPECT_EQ(packet_in.slon, packet2.slon);
    EXPECT_EQ(packet_in.llon, packet2.llon);
    EXPECT_EQ(packet_in.llat, packet2.llat);
    EXPECT_EQ(packet_in.auto_gps, packet2.auto_gps);
    EXPECT_EQ(packet_in.beacon, packet2.beacon);
    EXPECT_EQ(packet_in.down_freq, packet2.down_freq);
    EXPECT_EQ(packet_in.down_symb, packet2.down_symb);
    EXPECT_EQ(packet_in.down_polar, packet2.down_polar);
    EXPECT_EQ(packet_in.up_freq, packet2.up_freq);
    EXPECT_EQ(packet_in.up_polar, packet2.up_polar);
    EXPECT_EQ(packet_in.res1, packet2.res1);
    EXPECT_EQ(packet_in.res2, packet2.res2);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, MOTOR_CTRL)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::MOTOR_CTRL packet_in{};
    packet_in.cmd = 53;
    packet_in.addr = 120;
    packet_in.pos = 17.0;
    packet_in.pos1 = 45.0;
    packet_in.res1 = 73.0;
    packet_in.res2 = 101.0;

    mavlink::fppa::msg::MOTOR_CTRL packet1{};
    mavlink::fppa::msg::MOTOR_CTRL packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.cmd, packet2.cmd);
    EXPECT_EQ(packet1.addr, packet2.addr);
    EXPECT_EQ(packet1.pos, packet2.pos);
    EXPECT_EQ(packet1.pos1, packet2.pos1);
    EXPECT_EQ(packet1.res1, packet2.res1);
    EXPECT_EQ(packet1.res2, packet2.res2);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, MOTOR_CTRL)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_motor_ctrl_t packet_c {
         17.0, 45.0, 73.0, 101.0, 53, 120
    };

    mavlink::fppa::msg::MOTOR_CTRL packet_in{};
    packet_in.cmd = 53;
    packet_in.addr = 120;
    packet_in.pos = 17.0;
    packet_in.pos1 = 45.0;
    packet_in.res1 = 73.0;
    packet_in.res2 = 101.0;

    mavlink::fppa::msg::MOTOR_CTRL packet2{};

    mavlink_msg_motor_ctrl_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.cmd, packet2.cmd);
    EXPECT_EQ(packet_in.addr, packet2.addr);
    EXPECT_EQ(packet_in.pos, packet2.pos);
    EXPECT_EQ(packet_in.pos1, packet2.pos1);
    EXPECT_EQ(packet_in.res1, packet2.res1);
    EXPECT_EQ(packet_in.res2, packet2.res2);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, MANUAL_CONTROL)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::MANUAL_CONTROL packet_in{};
    packet_in.com_mode = 89;
    packet_in.ctrl_mode = 156;
    packet_in.abs_pitch = 17.0;
    packet_in.abs_yaw = 45.0;
    packet_in.abs_polar = 73.0;
    packet_in.rel_pitch = 101.0;
    packet_in.rel_yaw = 129.0;
    packet_in.res1 = 157.0;
    packet_in.res2 = 185.0;

    mavlink::fppa::msg::MANUAL_CONTROL packet1{};
    mavlink::fppa::msg::MANUAL_CONTROL packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.com_mode, packet2.com_mode);
    EXPECT_EQ(packet1.ctrl_mode, packet2.ctrl_mode);
    EXPECT_EQ(packet1.abs_pitch, packet2.abs_pitch);
    EXPECT_EQ(packet1.abs_yaw, packet2.abs_yaw);
    EXPECT_EQ(packet1.abs_polar, packet2.abs_polar);
    EXPECT_EQ(packet1.rel_pitch, packet2.rel_pitch);
    EXPECT_EQ(packet1.rel_yaw, packet2.rel_yaw);
    EXPECT_EQ(packet1.res1, packet2.res1);
    EXPECT_EQ(packet1.res2, packet2.res2);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, MANUAL_CONTROL)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_manual_control_t packet_c {
         17.0, 45.0, 73.0, 101.0, 129.0, 157.0, 185.0, 89, 156
    };

    mavlink::fppa::msg::MANUAL_CONTROL packet_in{};
    packet_in.com_mode = 89;
    packet_in.ctrl_mode = 156;
    packet_in.abs_pitch = 17.0;
    packet_in.abs_yaw = 45.0;
    packet_in.abs_polar = 73.0;
    packet_in.rel_pitch = 101.0;
    packet_in.rel_yaw = 129.0;
    packet_in.res1 = 157.0;
    packet_in.res2 = 185.0;

    mavlink::fppa::msg::MANUAL_CONTROL packet2{};

    mavlink_msg_manual_control_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.com_mode, packet2.com_mode);
    EXPECT_EQ(packet_in.ctrl_mode, packet2.ctrl_mode);
    EXPECT_EQ(packet_in.abs_pitch, packet2.abs_pitch);
    EXPECT_EQ(packet_in.abs_yaw, packet2.abs_yaw);
    EXPECT_EQ(packet_in.abs_polar, packet2.abs_polar);
    EXPECT_EQ(packet_in.rel_pitch, packet2.rel_pitch);
    EXPECT_EQ(packet_in.rel_yaw, packet2.rel_yaw);
    EXPECT_EQ(packet_in.res1, packet2.res1);
    EXPECT_EQ(packet_in.res2, packet2.res2);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, AUTO_TRACE)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::AUTO_TRACE packet_in{};
    packet_in.mode = 113;
    packet_in.sat_longitude = 17.0;
    packet_in.ant_id = 180;
    packet_in.sat_id = 963497672;
    packet_in.sat_polar = 73.0;
    packet_in.local_gps_type = 247;
    packet_in.local_longitude = 101.0;
    packet_in.local_latitude = 129.0;
    packet_in.local_altitude = 157.0;
    packet_in.res1 = 185.0;
    packet_in.res2 = 213.0;
    packet_in.res3 = 241.0;

    mavlink::fppa::msg::AUTO_TRACE packet1{};
    mavlink::fppa::msg::AUTO_TRACE packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.mode, packet2.mode);
    EXPECT_EQ(packet1.sat_longitude, packet2.sat_longitude);
    EXPECT_EQ(packet1.ant_id, packet2.ant_id);
    EXPECT_EQ(packet1.sat_id, packet2.sat_id);
    EXPECT_EQ(packet1.sat_polar, packet2.sat_polar);
    EXPECT_EQ(packet1.local_gps_type, packet2.local_gps_type);
    EXPECT_EQ(packet1.local_longitude, packet2.local_longitude);
    EXPECT_EQ(packet1.local_latitude, packet2.local_latitude);
    EXPECT_EQ(packet1.local_altitude, packet2.local_altitude);
    EXPECT_EQ(packet1.res1, packet2.res1);
    EXPECT_EQ(packet1.res2, packet2.res2);
    EXPECT_EQ(packet1.res3, packet2.res3);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, AUTO_TRACE)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_auto_trace_t packet_c {
         17.0, 963497672, 73.0, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 113, 180, 247
    };

    mavlink::fppa::msg::AUTO_TRACE packet_in{};
    packet_in.mode = 113;
    packet_in.sat_longitude = 17.0;
    packet_in.ant_id = 180;
    packet_in.sat_id = 963497672;
    packet_in.sat_polar = 73.0;
    packet_in.local_gps_type = 247;
    packet_in.local_longitude = 101.0;
    packet_in.local_latitude = 129.0;
    packet_in.local_altitude = 157.0;
    packet_in.res1 = 185.0;
    packet_in.res2 = 213.0;
    packet_in.res3 = 241.0;

    mavlink::fppa::msg::AUTO_TRACE packet2{};

    mavlink_msg_auto_trace_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.mode, packet2.mode);
    EXPECT_EQ(packet_in.sat_longitude, packet2.sat_longitude);
    EXPECT_EQ(packet_in.ant_id, packet2.ant_id);
    EXPECT_EQ(packet_in.sat_id, packet2.sat_id);
    EXPECT_EQ(packet_in.sat_polar, packet2.sat_polar);
    EXPECT_EQ(packet_in.local_gps_type, packet2.local_gps_type);
    EXPECT_EQ(packet_in.local_longitude, packet2.local_longitude);
    EXPECT_EQ(packet_in.local_latitude, packet2.local_latitude);
    EXPECT_EQ(packet_in.local_altitude, packet2.local_altitude);
    EXPECT_EQ(packet_in.res1, packet2.res1);
    EXPECT_EQ(packet_in.res2, packet2.res2);
    EXPECT_EQ(packet_in.res3, packet2.res3);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, DOWNLINK_PARAMS)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::DOWNLINK_PARAMS packet_in{};
    packet_in.frequency = 17.0;
    packet_in.symbol_rate = 45.0;
    packet_in.polar_type = 73.0;
    packet_in.type = 77;
    packet_in.res1 = 101.0;
    packet_in.res2 = 129.0;
    packet_in.res3 = 157.0;

    mavlink::fppa::msg::DOWNLINK_PARAMS packet1{};
    mavlink::fppa::msg::DOWNLINK_PARAMS packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.frequency, packet2.frequency);
    EXPECT_EQ(packet1.symbol_rate, packet2.symbol_rate);
    EXPECT_EQ(packet1.polar_type, packet2.polar_type);
    EXPECT_EQ(packet1.type, packet2.type);
    EXPECT_EQ(packet1.res1, packet2.res1);
    EXPECT_EQ(packet1.res2, packet2.res2);
    EXPECT_EQ(packet1.res3, packet2.res3);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, DOWNLINK_PARAMS)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_downlink_params_t packet_c {
         17.0, 45.0, 73.0, 101.0, 129.0, 157.0, 77
    };

    mavlink::fppa::msg::DOWNLINK_PARAMS packet_in{};
    packet_in.frequency = 17.0;
    packet_in.symbol_rate = 45.0;
    packet_in.polar_type = 73.0;
    packet_in.type = 77;
    packet_in.res1 = 101.0;
    packet_in.res2 = 129.0;
    packet_in.res3 = 157.0;

    mavlink::fppa::msg::DOWNLINK_PARAMS packet2{};

    mavlink_msg_downlink_params_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.frequency, packet2.frequency);
    EXPECT_EQ(packet_in.symbol_rate, packet2.symbol_rate);
    EXPECT_EQ(packet_in.polar_type, packet2.polar_type);
    EXPECT_EQ(packet_in.type, packet2.type);
    EXPECT_EQ(packet_in.res1, packet2.res1);
    EXPECT_EQ(packet_in.res2, packet2.res2);
    EXPECT_EQ(packet_in.res3, packet2.res3);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, UPLINK_PARAMS)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::UPLINK_PARAMS packet_in{};
    packet_in.frequency = 17.0;
    packet_in.polar_type = 45.0;
    packet_in.cmd = 77;
    packet_in.sw = 144;
    packet_in.lo = 211;
    packet_in.att = 73.0;
    packet_in.res1 = 101.0;
    packet_in.res2 = 129.0;
    packet_in.res3 = 157.0;

    mavlink::fppa::msg::UPLINK_PARAMS packet1{};
    mavlink::fppa::msg::UPLINK_PARAMS packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.frequency, packet2.frequency);
    EXPECT_EQ(packet1.polar_type, packet2.polar_type);
    EXPECT_EQ(packet1.cmd, packet2.cmd);
    EXPECT_EQ(packet1.sw, packet2.sw);
    EXPECT_EQ(packet1.lo, packet2.lo);
    EXPECT_EQ(packet1.att, packet2.att);
    EXPECT_EQ(packet1.res1, packet2.res1);
    EXPECT_EQ(packet1.res2, packet2.res2);
    EXPECT_EQ(packet1.res3, packet2.res3);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, UPLINK_PARAMS)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_uplink_params_t packet_c {
         17.0, 45.0, 73.0, 101.0, 129.0, 157.0, 77, 144, 211
    };

    mavlink::fppa::msg::UPLINK_PARAMS packet_in{};
    packet_in.frequency = 17.0;
    packet_in.polar_type = 45.0;
    packet_in.cmd = 77;
    packet_in.sw = 144;
    packet_in.lo = 211;
    packet_in.att = 73.0;
    packet_in.res1 = 101.0;
    packet_in.res2 = 129.0;
    packet_in.res3 = 157.0;

    mavlink::fppa::msg::UPLINK_PARAMS packet2{};

    mavlink_msg_uplink_params_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.frequency, packet2.frequency);
    EXPECT_EQ(packet_in.polar_type, packet2.polar_type);
    EXPECT_EQ(packet_in.cmd, packet2.cmd);
    EXPECT_EQ(packet_in.sw, packet2.sw);
    EXPECT_EQ(packet_in.lo, packet2.lo);
    EXPECT_EQ(packet_in.att, packet2.att);
    EXPECT_EQ(packet_in.res1, packet2.res1);
    EXPECT_EQ(packet_in.res2, packet2.res2);
    EXPECT_EQ(packet_in.res3, packet2.res3);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, RESERVE_DEBUG)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::RESERVE_DEBUG packet_in{};
    packet_in.res1 = 17.0;
    packet_in.res2 = 45.0;
    packet_in.res3 = 73.0;
    packet_in.res4 = 101.0;
    packet_in.res5 = 963498296;
    packet_in.res6 = 963498504;
    packet_in.res7 = 963498712;
    packet_in.res8 = 963498920;

    mavlink::fppa::msg::RESERVE_DEBUG packet1{};
    mavlink::fppa::msg::RESERVE_DEBUG packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.res1, packet2.res1);
    EXPECT_EQ(packet1.res2, packet2.res2);
    EXPECT_EQ(packet1.res3, packet2.res3);
    EXPECT_EQ(packet1.res4, packet2.res4);
    EXPECT_EQ(packet1.res5, packet2.res5);
    EXPECT_EQ(packet1.res6, packet2.res6);
    EXPECT_EQ(packet1.res7, packet2.res7);
    EXPECT_EQ(packet1.res8, packet2.res8);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, RESERVE_DEBUG)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_reserve_debug_t packet_c {
         17.0, 45.0, 73.0, 101.0, 963498296, 963498504, 963498712, 963498920
    };

    mavlink::fppa::msg::RESERVE_DEBUG packet_in{};
    packet_in.res1 = 17.0;
    packet_in.res2 = 45.0;
    packet_in.res3 = 73.0;
    packet_in.res4 = 101.0;
    packet_in.res5 = 963498296;
    packet_in.res6 = 963498504;
    packet_in.res7 = 963498712;
    packet_in.res8 = 963498920;

    mavlink::fppa::msg::RESERVE_DEBUG packet2{};

    mavlink_msg_reserve_debug_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.res1, packet2.res1);
    EXPECT_EQ(packet_in.res2, packet2.res2);
    EXPECT_EQ(packet_in.res3, packet2.res3);
    EXPECT_EQ(packet_in.res4, packet2.res4);
    EXPECT_EQ(packet_in.res5, packet2.res5);
    EXPECT_EQ(packet_in.res6, packet2.res6);
    EXPECT_EQ(packet_in.res7, packet2.res7);
    EXPECT_EQ(packet_in.res8, packet2.res8);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, ADRC_TUNING)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::ADRC_TUNING packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.td_x1 = 73.0;
    packet_in.td_x2 = 101.0;
    packet_in.td_r = 129.0;
    packet_in.td_h = 157.0;
    packet_in.td_N0 = 185.0;
    packet_in.td_damp_c = 213.0;
    packet_in.td_h0 = 241.0;
    packet_in.td_fh = 269.0;
    packet_in.eso_z1 = 297.0;
    packet_in.eso_z2 = 325.0;
    packet_in.eso_z3 = 353.0;
    packet_in.eso_e = 381.0;
    packet_in.eso_y = 409.0;
    packet_in.eso_fe = 437.0;
    packet_in.eso_fe1 = 465.0;
    packet_in.eso_beta_01 = 493.0;
    packet_in.eso_beta_02 = 521.0;
    packet_in.nlsef_beta0 = 549.0;
    packet_in.nlsef_beta1 = 577.0;
    packet_in.nlsef_beta2 = 605.0;
    packet_in.nlsef_alpha1 = 633.0;
    packet_in.nlsef_alpha2 = 661.0;
    packet_in.nlsef_a = 689.0;
    packet_in.nlsef_b = 717.0;
    packet_in.nlsef_c = 745.0;
    packet_in.axis = 73;

    mavlink::fppa::msg::ADRC_TUNING packet1{};
    mavlink::fppa::msg::ADRC_TUNING packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet1.td_x1, packet2.td_x1);
    EXPECT_EQ(packet1.td_x2, packet2.td_x2);
    EXPECT_EQ(packet1.td_r, packet2.td_r);
    EXPECT_EQ(packet1.td_h, packet2.td_h);
    EXPECT_EQ(packet1.td_N0, packet2.td_N0);
    EXPECT_EQ(packet1.td_damp_c, packet2.td_damp_c);
    EXPECT_EQ(packet1.td_h0, packet2.td_h0);
    EXPECT_EQ(packet1.td_fh, packet2.td_fh);
    EXPECT_EQ(packet1.eso_z1, packet2.eso_z1);
    EXPECT_EQ(packet1.eso_z2, packet2.eso_z2);
    EXPECT_EQ(packet1.eso_z3, packet2.eso_z3);
    EXPECT_EQ(packet1.eso_e, packet2.eso_e);
    EXPECT_EQ(packet1.eso_y, packet2.eso_y);
    EXPECT_EQ(packet1.eso_fe, packet2.eso_fe);
    EXPECT_EQ(packet1.eso_fe1, packet2.eso_fe1);
    EXPECT_EQ(packet1.eso_beta_01, packet2.eso_beta_01);
    EXPECT_EQ(packet1.eso_beta_02, packet2.eso_beta_02);
    EXPECT_EQ(packet1.nlsef_beta0, packet2.nlsef_beta0);
    EXPECT_EQ(packet1.nlsef_beta1, packet2.nlsef_beta1);
    EXPECT_EQ(packet1.nlsef_beta2, packet2.nlsef_beta2);
    EXPECT_EQ(packet1.nlsef_alpha1, packet2.nlsef_alpha1);
    EXPECT_EQ(packet1.nlsef_alpha2, packet2.nlsef_alpha2);
    EXPECT_EQ(packet1.nlsef_a, packet2.nlsef_a);
    EXPECT_EQ(packet1.nlsef_b, packet2.nlsef_b);
    EXPECT_EQ(packet1.nlsef_c, packet2.nlsef_c);
    EXPECT_EQ(packet1.axis, packet2.axis);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, ADRC_TUNING)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_adrc_tuning_t packet_c {
         93372036854775807ULL, 73.0, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 269.0, 297.0, 325.0, 353.0, 381.0, 409.0, 437.0, 465.0, 493.0, 521.0, 549.0, 577.0, 605.0, 633.0, 661.0, 689.0, 717.0, 745.0, 73
    };

    mavlink::fppa::msg::ADRC_TUNING packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.td_x1 = 73.0;
    packet_in.td_x2 = 101.0;
    packet_in.td_r = 129.0;
    packet_in.td_h = 157.0;
    packet_in.td_N0 = 185.0;
    packet_in.td_damp_c = 213.0;
    packet_in.td_h0 = 241.0;
    packet_in.td_fh = 269.0;
    packet_in.eso_z1 = 297.0;
    packet_in.eso_z2 = 325.0;
    packet_in.eso_z3 = 353.0;
    packet_in.eso_e = 381.0;
    packet_in.eso_y = 409.0;
    packet_in.eso_fe = 437.0;
    packet_in.eso_fe1 = 465.0;
    packet_in.eso_beta_01 = 493.0;
    packet_in.eso_beta_02 = 521.0;
    packet_in.nlsef_beta0 = 549.0;
    packet_in.nlsef_beta1 = 577.0;
    packet_in.nlsef_beta2 = 605.0;
    packet_in.nlsef_alpha1 = 633.0;
    packet_in.nlsef_alpha2 = 661.0;
    packet_in.nlsef_a = 689.0;
    packet_in.nlsef_b = 717.0;
    packet_in.nlsef_c = 745.0;
    packet_in.axis = 73;

    mavlink::fppa::msg::ADRC_TUNING packet2{};

    mavlink_msg_adrc_tuning_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet_in.td_x1, packet2.td_x1);
    EXPECT_EQ(packet_in.td_x2, packet2.td_x2);
    EXPECT_EQ(packet_in.td_r, packet2.td_r);
    EXPECT_EQ(packet_in.td_h, packet2.td_h);
    EXPECT_EQ(packet_in.td_N0, packet2.td_N0);
    EXPECT_EQ(packet_in.td_damp_c, packet2.td_damp_c);
    EXPECT_EQ(packet_in.td_h0, packet2.td_h0);
    EXPECT_EQ(packet_in.td_fh, packet2.td_fh);
    EXPECT_EQ(packet_in.eso_z1, packet2.eso_z1);
    EXPECT_EQ(packet_in.eso_z2, packet2.eso_z2);
    EXPECT_EQ(packet_in.eso_z3, packet2.eso_z3);
    EXPECT_EQ(packet_in.eso_e, packet2.eso_e);
    EXPECT_EQ(packet_in.eso_y, packet2.eso_y);
    EXPECT_EQ(packet_in.eso_fe, packet2.eso_fe);
    EXPECT_EQ(packet_in.eso_fe1, packet2.eso_fe1);
    EXPECT_EQ(packet_in.eso_beta_01, packet2.eso_beta_01);
    EXPECT_EQ(packet_in.eso_beta_02, packet2.eso_beta_02);
    EXPECT_EQ(packet_in.nlsef_beta0, packet2.nlsef_beta0);
    EXPECT_EQ(packet_in.nlsef_beta1, packet2.nlsef_beta1);
    EXPECT_EQ(packet_in.nlsef_beta2, packet2.nlsef_beta2);
    EXPECT_EQ(packet_in.nlsef_alpha1, packet2.nlsef_alpha1);
    EXPECT_EQ(packet_in.nlsef_alpha2, packet2.nlsef_alpha2);
    EXPECT_EQ(packet_in.nlsef_a, packet2.nlsef_a);
    EXPECT_EQ(packet_in.nlsef_b, packet2.nlsef_b);
    EXPECT_EQ(packet_in.nlsef_c, packet2.nlsef_c);
    EXPECT_EQ(packet_in.axis, packet2.axis);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif

TEST(fppa, PID_TUNING)
{
    mavlink::mavlink_message_t msg;
    mavlink::MsgMap map1(msg);
    mavlink::MsgMap map2(msg);

    mavlink::fppa::msg::PID_TUNING packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.roll_desired = 73.0;
    packet_in.roll_achieved = 101.0;
    packet_in.roll_FF = 129.0;
    packet_in.roll_P = 157.0;
    packet_in.roll_I = 185.0;
    packet_in.roll_D = 213.0;
    packet_in.roll_error = 241.0;
    packet_in.roll_error_td = 269.0;
    packet_in.roll_derivator = 297.0;
    packet_in.roll_derivator_td = 325.0;
    packet_in.roll_ff_comp = 353.0;
    packet_in.pitch_desired = 381.0;
    packet_in.pitch_achieved = 409.0;
    packet_in.pitchl_FF = 437.0;
    packet_in.pitch_P = 465.0;
    packet_in.pitch_I = 493.0;
    packet_in.pitch_D = 521.0;
    packet_in.pitch_error = 549.0;
    packet_in.pitch_error_td = 577.0;
    packet_in.pitch_derivator = 605.0;
    packet_in.pitch_derivator_td = 633.0;
    packet_in.pitch_ff_comp = 661.0;
    packet_in.yaw_desired = 689.0;
    packet_in.yaw_achieved = 717.0;
    packet_in.yaw_FF = 745.0;
    packet_in.yaw_P = 773.0;
    packet_in.yaw_I = 801.0;
    packet_in.yaw_D = 829.0;
    packet_in.yaw_error = 857.0;
    packet_in.yaw_error_td = 885.0;
    packet_in.yaw_derivator = 913.0;
    packet_in.yaw_derivator_td = 941.0;
    packet_in.yaw_ff_comp = 969.0;

    mavlink::fppa::msg::PID_TUNING packet1{};
    mavlink::fppa::msg::PID_TUNING packet2{};

    packet1 = packet_in;

    //std::cout << packet1.to_yaml() << std::endl;

    packet1.serialize(map1);

    mavlink::mavlink_finalize_message(&msg, 1, 1, packet1.MIN_LENGTH, packet1.LENGTH, packet1.CRC_EXTRA);

    packet2.deserialize(map2);

    EXPECT_EQ(packet1.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet1.roll_desired, packet2.roll_desired);
    EXPECT_EQ(packet1.roll_achieved, packet2.roll_achieved);
    EXPECT_EQ(packet1.roll_FF, packet2.roll_FF);
    EXPECT_EQ(packet1.roll_P, packet2.roll_P);
    EXPECT_EQ(packet1.roll_I, packet2.roll_I);
    EXPECT_EQ(packet1.roll_D, packet2.roll_D);
    EXPECT_EQ(packet1.roll_error, packet2.roll_error);
    EXPECT_EQ(packet1.roll_error_td, packet2.roll_error_td);
    EXPECT_EQ(packet1.roll_derivator, packet2.roll_derivator);
    EXPECT_EQ(packet1.roll_derivator_td, packet2.roll_derivator_td);
    EXPECT_EQ(packet1.roll_ff_comp, packet2.roll_ff_comp);
    EXPECT_EQ(packet1.pitch_desired, packet2.pitch_desired);
    EXPECT_EQ(packet1.pitch_achieved, packet2.pitch_achieved);
    EXPECT_EQ(packet1.pitchl_FF, packet2.pitchl_FF);
    EXPECT_EQ(packet1.pitch_P, packet2.pitch_P);
    EXPECT_EQ(packet1.pitch_I, packet2.pitch_I);
    EXPECT_EQ(packet1.pitch_D, packet2.pitch_D);
    EXPECT_EQ(packet1.pitch_error, packet2.pitch_error);
    EXPECT_EQ(packet1.pitch_error_td, packet2.pitch_error_td);
    EXPECT_EQ(packet1.pitch_derivator, packet2.pitch_derivator);
    EXPECT_EQ(packet1.pitch_derivator_td, packet2.pitch_derivator_td);
    EXPECT_EQ(packet1.pitch_ff_comp, packet2.pitch_ff_comp);
    EXPECT_EQ(packet1.yaw_desired, packet2.yaw_desired);
    EXPECT_EQ(packet1.yaw_achieved, packet2.yaw_achieved);
    EXPECT_EQ(packet1.yaw_FF, packet2.yaw_FF);
    EXPECT_EQ(packet1.yaw_P, packet2.yaw_P);
    EXPECT_EQ(packet1.yaw_I, packet2.yaw_I);
    EXPECT_EQ(packet1.yaw_D, packet2.yaw_D);
    EXPECT_EQ(packet1.yaw_error, packet2.yaw_error);
    EXPECT_EQ(packet1.yaw_error_td, packet2.yaw_error_td);
    EXPECT_EQ(packet1.yaw_derivator, packet2.yaw_derivator);
    EXPECT_EQ(packet1.yaw_derivator_td, packet2.yaw_derivator_td);
    EXPECT_EQ(packet1.yaw_ff_comp, packet2.yaw_ff_comp);
}

#ifdef TEST_INTEROP
TEST(fppa_interop, PID_TUNING)
{
    mavlink_message_t msg;

    // to get nice print
    memset(&msg, 0, sizeof(msg));

    mavlink_pid_tuning_t packet_c {
         93372036854775807ULL, 73.0, 101.0, 129.0, 157.0, 185.0, 213.0, 241.0, 269.0, 297.0, 325.0, 353.0, 381.0, 409.0, 437.0, 465.0, 493.0, 521.0, 549.0, 577.0, 605.0, 633.0, 661.0, 689.0, 717.0, 745.0, 773.0, 801.0, 829.0, 857.0, 885.0, 913.0, 941.0, 969.0
    };

    mavlink::fppa::msg::PID_TUNING packet_in{};
    packet_in.time_boot_ms = 93372036854775807ULL;
    packet_in.roll_desired = 73.0;
    packet_in.roll_achieved = 101.0;
    packet_in.roll_FF = 129.0;
    packet_in.roll_P = 157.0;
    packet_in.roll_I = 185.0;
    packet_in.roll_D = 213.0;
    packet_in.roll_error = 241.0;
    packet_in.roll_error_td = 269.0;
    packet_in.roll_derivator = 297.0;
    packet_in.roll_derivator_td = 325.0;
    packet_in.roll_ff_comp = 353.0;
    packet_in.pitch_desired = 381.0;
    packet_in.pitch_achieved = 409.0;
    packet_in.pitchl_FF = 437.0;
    packet_in.pitch_P = 465.0;
    packet_in.pitch_I = 493.0;
    packet_in.pitch_D = 521.0;
    packet_in.pitch_error = 549.0;
    packet_in.pitch_error_td = 577.0;
    packet_in.pitch_derivator = 605.0;
    packet_in.pitch_derivator_td = 633.0;
    packet_in.pitch_ff_comp = 661.0;
    packet_in.yaw_desired = 689.0;
    packet_in.yaw_achieved = 717.0;
    packet_in.yaw_FF = 745.0;
    packet_in.yaw_P = 773.0;
    packet_in.yaw_I = 801.0;
    packet_in.yaw_D = 829.0;
    packet_in.yaw_error = 857.0;
    packet_in.yaw_error_td = 885.0;
    packet_in.yaw_derivator = 913.0;
    packet_in.yaw_derivator_td = 941.0;
    packet_in.yaw_ff_comp = 969.0;

    mavlink::fppa::msg::PID_TUNING packet2{};

    mavlink_msg_pid_tuning_encode(1, 1, &msg, &packet_c);

    // simulate message-handling callback
    [&packet2](const mavlink_message_t *cmsg) {
        MsgMap map2(cmsg);

        packet2.deserialize(map2);
    } (&msg);

    EXPECT_EQ(packet_in.time_boot_ms, packet2.time_boot_ms);
    EXPECT_EQ(packet_in.roll_desired, packet2.roll_desired);
    EXPECT_EQ(packet_in.roll_achieved, packet2.roll_achieved);
    EXPECT_EQ(packet_in.roll_FF, packet2.roll_FF);
    EXPECT_EQ(packet_in.roll_P, packet2.roll_P);
    EXPECT_EQ(packet_in.roll_I, packet2.roll_I);
    EXPECT_EQ(packet_in.roll_D, packet2.roll_D);
    EXPECT_EQ(packet_in.roll_error, packet2.roll_error);
    EXPECT_EQ(packet_in.roll_error_td, packet2.roll_error_td);
    EXPECT_EQ(packet_in.roll_derivator, packet2.roll_derivator);
    EXPECT_EQ(packet_in.roll_derivator_td, packet2.roll_derivator_td);
    EXPECT_EQ(packet_in.roll_ff_comp, packet2.roll_ff_comp);
    EXPECT_EQ(packet_in.pitch_desired, packet2.pitch_desired);
    EXPECT_EQ(packet_in.pitch_achieved, packet2.pitch_achieved);
    EXPECT_EQ(packet_in.pitchl_FF, packet2.pitchl_FF);
    EXPECT_EQ(packet_in.pitch_P, packet2.pitch_P);
    EXPECT_EQ(packet_in.pitch_I, packet2.pitch_I);
    EXPECT_EQ(packet_in.pitch_D, packet2.pitch_D);
    EXPECT_EQ(packet_in.pitch_error, packet2.pitch_error);
    EXPECT_EQ(packet_in.pitch_error_td, packet2.pitch_error_td);
    EXPECT_EQ(packet_in.pitch_derivator, packet2.pitch_derivator);
    EXPECT_EQ(packet_in.pitch_derivator_td, packet2.pitch_derivator_td);
    EXPECT_EQ(packet_in.pitch_ff_comp, packet2.pitch_ff_comp);
    EXPECT_EQ(packet_in.yaw_desired, packet2.yaw_desired);
    EXPECT_EQ(packet_in.yaw_achieved, packet2.yaw_achieved);
    EXPECT_EQ(packet_in.yaw_FF, packet2.yaw_FF);
    EXPECT_EQ(packet_in.yaw_P, packet2.yaw_P);
    EXPECT_EQ(packet_in.yaw_I, packet2.yaw_I);
    EXPECT_EQ(packet_in.yaw_D, packet2.yaw_D);
    EXPECT_EQ(packet_in.yaw_error, packet2.yaw_error);
    EXPECT_EQ(packet_in.yaw_error_td, packet2.yaw_error_td);
    EXPECT_EQ(packet_in.yaw_derivator, packet2.yaw_derivator);
    EXPECT_EQ(packet_in.yaw_derivator_td, packet2.yaw_derivator_td);
    EXPECT_EQ(packet_in.yaw_ff_comp, packet2.yaw_ff_comp);

#ifdef PRINT_MSG
    PRINT_MSG(msg);
#endif
}
#endif
